How to exclude your own IP address from Google Analytics

1 minute read

To exclude your own IP address from Google Analytics, the most reliable methods involve either using the Google Analytics Opt-out Add-on or setting up a Data Filter within your Google Analytics 4 (GA4) property.

Method 1: The Google Analytics Opt-out Add-on

This is the simplest way to ensure your browsing activity across all the sites you manage (not just your blog) is ignored.

  1. Download the Google Analytics Opt-out Add-on provided by Google.
  2. Install it in your primary browser.
  3. The extension will tell the Google Analytics JavaScript (gtag.js) not to send information to Google Analytics.

Method 2: Internal Traffic Filtering (GA4)

If you prefer a solution that works across all your devices (like your phone) without installing extensions, you can filter your specific IP address within the GA4 dashboard.

Step A: Define Internal Traffic

  1. Go to your Google Analytics Admin panel.
  2. Under Data Collection and Modification, click Data Streams.
  3. Select your website stream and click Configure tag settings.
  4. Click Show all and select Define internal traffic.
  5. Click Create and enter your IP address (you can find it by searching “what is my IP” on Google). Set the traffic_type value to internal.

Step B: Activate the Filter

  1. Return to the Admin panel.
  2. Under Data Settings, click Data Filters.
  3. Click on the Internal Traffic filter (which GA4 creates by default).
  4. Change the Filter state from “Testing” to Active and click save.

Method 3: The “Developer Mode” Hack (Jekyll Specific)

Minimal Mistakes is designed to exclude the analytics script automatically when you are running the site locally (e.g., bundle exec jekyll serve).

  • How it works: The theme checks the jekyll.environment variable.
  • The Benefit: As long as you only view your “live” site occasionally and do most of your checking on localhost:4000, your stats will remain very clean without any extra configuration.

Comments