Sachin Kalsi

Data Science Architect (NLP)

Specializing in Large Language Models, Semantic Search, and Generative AI. Turning complex data into actionable architectural solutions.

Download Resume

Google Analytics Setup Guide

Step 1: Create a Google Analytics Account

  1. Go to Google Analytics
  2. Sign in with your Google account
  3. Click “Start measuring”

Step 2: Create a Property

  1. Account Setup:
  2. Property Setup:
  3. Business Information:
  4. Accept Terms:

Step 3: Get Your Measurement ID

  1. After creating the property, you’ll see “Data Streams”
  2. Click “Add stream”“Web”
  3. Enter:
  4. Click “Create stream”
  5. You’ll see your Measurement ID (format: G-XXXXXXXXXX)

Step 4: Add Measurement ID to Your Site

  1. Open _config.yml in your project
  2. Find the line: google_analytics: ""
  3. Add your Measurement ID:
    google_analytics: "G-XXXXXXXXXX"  # Replace with your actual ID
    
  4. Save the file
  5. Commit and push to GitHub:
    git add _config.yml
    git commit -m "Add Google Analytics tracking"
    git push
    

Step 5: Verify It’s Working

  1. Wait 1-2 minutes for GitHub Pages to rebuild
  2. Visit your website: https://sachinkalsi.github.io
  3. Go to Google Analytics → ReportsRealtime
  4. You should see yourself as a visitor within a few seconds!

What You Can Track

Overview Metrics

Blog-Specific Tracking

Detailed Reports Available

  1. Realtime: See live visitors right now
  2. Acquisition: Where your traffic comes from
  3. Engagement: How people interact with your site
  4. Demographics: Age, gender, location of visitors
  5. Technology: Devices, browsers used
  6. Events: Track specific actions (clicks, downloads, etc.)

Viewing Your Analytics

  1. Go to Google Analytics
  2. Select your property
  3. Use the left sidebar to navigate:

Privacy Note

Google Analytics is GDPR compliant when properly configured. The tracking code I added respects user privacy and doesn’t collect personal information.

Troubleshooting

Not seeing data?

Want to test?