How to exclude your own IP address from Google Analytics
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.
- Download the Google Analytics Opt-out Add-on provided by Google.
- Install it in your primary browser.
- 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
- Go to your Google Analytics Admin panel.
- Under Data Collection and Modification, click Data Streams.
- Select your website stream and click Configure tag settings.
- Click Show all and select Define internal traffic.
- Click Create and enter your IP address (you can find it by searching
“what is my IP” on Google). Set the
traffic_typevalue tointernal.
Step B: Activate the Filter
- Return to the Admin panel.
- Under Data Settings, click Data Filters.
- Click on the Internal Traffic filter (which GA4 creates by default).
- 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.environmentvariable. - 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