Exclude internal traffic from Google Analytics 4
Last Updated / Reviewed: Jan 10th, 2023
Execution Time: 5-10 minutes
Goal: To exclude all traffic that is generated by you, or your employees/contractors.
Ideal Outcome: Your internal traffic will not affect your Google Analytics’ metrics.
Pre-requisites or requirements: Google Analytics needs to be set up on your website. If you haven’t done so, follow this SOP instead.
Why this is important: Your internal traffic can seriously skew your metrics to the point of getting you to make wrong decisions. You want to keep your data clean and as accurate as possible.
Where this is done: In your Google Analytics 4 account.
When this is done: As soon as you set up your Google Analytics account, and whenever you suspect internal traffic might be skewing your data.
Who does this: The person responsible for Analytics. You and your employees / contractors.
Define internal traffic in Google Analytics 4
- Login to your Google Analytics account.
- Click “Admin”.
3. Make sure you’ve selected the correct property (website) and select “Data Streams”.
4. Select your website that you want to implement Google Analytics 4.
5. At the bottom of the page, click “More Tagging Settings” under Additional settings.
6. Click “Define internal traffic”.
7. Click “Create” to define the internal traffic rules.
8. Change the Rule name to “Internal traffic” and leave the default traffic_type value to internal.
9. Set the Match type to “IP address equals” and set the value to your IP address.
10. If you don’t know what’s your IP address, click “What’s my IP address”, and Google will show your current IP address.
11. If you need to exclude multiple IP addresses, such as excluding traffic from your co-workers or other other devices, then click “Add condition” and repeat step 9.
12. You have now defined the internal traffic in Google Analytics 4, go ahead and create a filter to exclude this internal traffic.
Activating internal traffic filter in Google Analytics 4
- Login to your Google Analytics account.
- Click “Admin”.
3. Click “Data Filters” under Data Settings.
4. You should see a filter for internal traffic. This is the default filter that is created when you create a Google Analytics 4 property. Make sure it is in testing mode.
5. If it’s not in testing mode, click on the 3 dot “kebab menu” and select “Test filter”.
6. Now we need to test if the internal traffic filter is working. If it’s working, then we will activate the internal traffic filter.
Important: Make sure you run this test as filtering in Google Analytics 4 is a destructive operation. Once you filter data, it’s gone forever.
7. Head to Reports ➝ Real-time.
8. Click “Add comparison”, it should bring up the comparison editor.
9. Click “Select dimension”, search for Test data filter name then select it.
10. Then click on “Select dimension values”, select “Internal Traffic”, and click OK.
11. Make sure the test filter is correct, then click “Apply”.
12. Now open a new tab in your browser visit your website.
13. Then head back to the Google Analytics 4 Real-time report. You should see 1 user that is in the test data filter. If you see this data that means the internal traffic filter is working.
14. Head to admin again by clicking “Admin”.
15. Click “Data Filters” under Data Settings.
16. Click the “kebab menu” and select “Activate filter”.
17. Once it’s active, you will have successfully excluded internal traffic from Google Analytics 4.