Flying Spares, provider of spare parts for vintage cars and high quality marques, displaying a Rolls-Royce from their eCommerce Shopify development from magic42

Flying Spares

International B2B Magento with 240k catalogue, Khaos Control Integration and digital marketing.
See our work
Stone Computers Case Study by magic42

Stone Computers

Adobe Magento Commerce B2C, B2B portal and PunchOut sites and bespoke loan payment solution.
See our work
Alan Paine quality clothing retailer showing their brand, as featured in their case study for their eCommerce website with magic42

Alan Paine

Multisite, B2C migration from Magento to Shopify Plus with ERP integration.
See our work
Haws Watering Cans case study after eCommerce development agency, magic42, migrated their site to Shopify

Haws Watering Cans

B2C eCommerce strategy, UX improvements, AdWords and Klaviyo email marketing management.
See our work
Alan Paine quality clothing retailer showing their brand, as featured in their case study for their eCommerce website with magic42

Alan Paine

Multi-site, B2C migration from Magento to Shopify Plus with ERP integration.
Find out more
Roger Clark Motorsport automative eCommerce client case study from magic42, showing high quality silver cars in a slick garage

Roger Clark Motorsport

B2C and B2B migration of bespoke, global automotive parts website to Shopify.
Find out more

Call Us

Speak to a Shopify expert:

0121 663 6360

Get in touch 
magic42 - eCommerce development experts born from retail success

Born from a retailer

Read the full story of how our award-winning retail business developed into magic42.
Find out more
Envision Workshop documents as an outcome from our replatforming and migration meeting for your eCommerce website

How we'll work with you

Find out what it's like to partner with us and the steps involved for your eCommerce project.
Find out more
Alex Ashman, director of magic42, in a bumper car with a huge grin on his face as he mingles with his eCommerce development team at magic42

Looking for a career with us?

Take a look at what it's like to work at magic42 and the opportunities we offer.
Find out more

Call Us

Speak to our eCommerce experts:

0121 663 6360

Get in touch 

How to remove internal web traffic from GA4

Author: 
Alex Ashman
Published: 
June 4, 2024
How to remove internal web traffic from Google Analytics (GA4) using blog advice from eCommerce development agency, magic42

Measuring customer web traffic is important for eCommerce businesses, such as how they’re getting to each page, how long they’re staying there, and if they’re making a purchase. Google Analytics (GA4) is often the tool used by most businesses to measure these behaviours, helping inform future strategies. However, this data can be skewed by employee visits, or ‘internal web traffic’.

To make sure your data remains accurate, we’ve put together a simple but effective guide to help filter out internal web traffic from GA4.

Why you should remove traffic in GA4

There are times when members of your business will need to visit your site, such as to amend product pages, add marketing messages, or simply to review what’s in place. Members from the merchandising teams, marketing teams and beyond will have a reason to visit. The problem is that each visit and interaction will be tracked in GA4 by default, giving you inaccurate data about page popularity or a visitor’s site journey. 

An even bigger consideration is that, as an eCommerce business, you may be using the same account details between a staging version of your site and the live version. This has the impact of skewing the data even more, let alone from any test orders placed from the staging site. The more the data is skewed, the bigger the problem internal web traffic becomes, making it difficult to react to product trends, create marketing campaigns or simply plan ahead.

However, there is a solution for filtering out internal traffic from GA4. 

How to filter out traffic in GA4

You can filter out specific web traffic in Google Analytics 4 by using its ‘Internal Traffic Filter’. This works by adding a ‘traffic_type’ parameter to every incoming event.

To do this, you’ll first need an Editor role at the property level of GA4. This will help you identify and amend filters. If you need to place this filter in place and are acting on behalf of someone more senior, then make sure to request Editor access from them or be granted permission before you proceed.

Once you have an Editor role, the first step will be to identify your internal traffic so this can be filtered out.

Step 1: Identify your internal traffic in GA4

First, it’s worth knowing the IP addresses you wish to identify and filter out of internal traffic. If it’s your own IP, this can be identified later in the process. Once you have what you need, login to GA4.

In GA4, click ‘Admin’ in the bottom left of the screen.

Head to the ‘Data collection and modifications’ section and click ‘Data streams’.

Google Analytics 4 (GA4) showing step 1 of identifying traffic to your eCommerce website (data sources)

You will see a list of traffic data streams that will have been set up. Click one of these data streams - preferably the one you’d like to filter out of your analytics.

In the list that appears, click ‘Configure Tag Settings’.

Google Analytics 4 (GA4) showing step 2 of identifying traffic to your eCommerce website (configure tag settings)

In the ‘Settings’ that appear, click ‘Show more’ to reveal all the tag settings. You can then click ‘Define Internal Traffic’ from the options that appear.

Google Analytics 4 (GA4) showing step 3 of identifying traffic to your eCommerce website (define internal traffic)

In the new window that appears, click ‘Create’. You can then enter a new ‘Rule name’ for the traffic, such as ‘Filter out internal traffic’, as well as a ‘traffic_type value’, such as ‘internal’.

Next, click the ‘IP address match type’ dropdown menu and select one of the options. We recommend ‘IP address equals’. You can then input the full IP address into the ‘Value’ field to its right. Do this for as many IP addresses as you’d like to identify and filter, using the ‘Add condition’ button.

Google Analytics 4 (GA4) showing step 4 of identifying traffic to your eCommerce website (internal traffic rule and IP address additions)

Click the blue ‘Create’ button to create the rule.

Google Analytics will now be able to identify those IP addresses in its data. With this set up, you can now make sure these are filtered out of reporting data in our next step.

Step 2: Create a GA4 data filter for traffic

First, click ‘Admin’ in the bottom left of the screen.

Head to the ‘Data Collections and Modifications’ section, then click ‘Data filters’.

Google Analytics 4 (GA4) showing step 1 of filtering traffic to your eCommerce website (data filters)

Click the ‘Create filter’ button.

You can select your filter type, which in this case is ‘Internal traffic’.

Fill out the ‘Data filter name’ you want to set, which should ideally be a descriptive name for the type of traffic you’d like to filter out. You can leave the ‘Filter operation’ field as ‘Exclude’. 

Google Analytics 4 (GA4) showing step 2 of filtering traffic to your eCommerce website (creating a data filter, name and parameter)

In the ‘Filter events with the following parameter value’ section, enter the ‘Parameter value’ name you set earlier (which is ‘internal’ in this example).

Under the ‘Filter state’ section on the same page, you’ll see states the filter can be in (‘Testing’, ‘Active’ and ‘Inactive’). It’s recommended to test the filter before fully activating it, using the ‘Testing’ field. You can activate the filter by returning here and clicking ‘Active’.

Google Analytics 4 (GA4) showing step 3 of filtering traffic to your eCommerce website (traffic types and setting a filter state)

Once you are happy with the details, click the blue ‘Create’ button in the top right.

Step 3: Test your data filter

As alluded to earlier, the final step is to test your new data filter. Doing so will ensure it is correctly filtering out traffic from your selected IP addresses. This works by any filtered traffic from those IP addresses being added to the ‘Test data filter name’ dimension, with the filter name shown as its value.

Simply visit your site using the filtered IP address to make sure it is working correctly. 

What to do if your GA4 data filter isn’t working

If your internal web traffic is still showing in GA4 instead of being filtered, then it may be worth tinkering with the settings to make sure you followed the above steps.

One thing worth noting is that it can take 24-36 hours for a new filter to apply in Google Analytics. Keep that in mind before going through the steps again or changing any existing settings to optimise GA4.

We also have plenty more advice to help you optimise GA4. For example, have you updated your data privacy regulations in line with the new Google Consent Mode v2 update, or made the correct changes for the new Gmail and Yahoo mail sending requirements? Or perhaps you’re looking to improve your Google data analysis further - have you checked for unwanted referrals in GA4?


For even more advice, why not reach out to see how our eCommerce development agency can help you?

magic42 logo
magic42 is a UK-based eCommerce development agency, born from an award-winning retailer. Having grown with the industry since the year 2000, we provide our unique perspective to help clients get the best from their eCommerce platforms.
Company No. 11572347 VAT No. 310 2436 61
Adobe Solution Partners Bronze Logo, used by verified Adobe expertsShopify Partners Logo (as used by Shopify Development Partners)
© Copyright 2024 magic42 Limited - All Rights Reserved
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram