Filtering internal traffic from Google Analytics is important to ensure accurate reporting of website traffic and user behavior. Internal traffic refers to visits to the website from people who work within the organization, such as employees or contractors, who may not represent the typical website visitor.
One way to filter internal traffic is by using Google Tag Manager. Here are the steps:
- Create a new Google Analytics variable in Google Tag Manager.
- Select the “Fields to Set” option and enter the following field and value:
- Field: “customTask”
- Value: function() { var tracker = ga.getAll()[0]; tracker.set(‘dimension1’, ‘Internal’); }
- Save the variable and publish the changes in Google Tag Manager.
- Create a new Google Analytics filter in the Google Analytics Admin panel.
- Choose “Custom” and select the “Exclude” filter type.
- Select the “User Defined” option and enter the following:
- Filter Field: “Custom Dimension 1”
- Filter Pattern: “Internal”
- Save the filter and apply it to the relevant Google Analytics view.
These steps will create a custom dimension in Google Analytics that will label internal traffic as “Internal.” The filter will then exclude any traffic that matches this label from the Google Analytics reports.
It’s important to note that this method requires the Google Analytics tracking code to be installed on all pages of the website, and for the Google Tag Manager container to be installed on all pages as well. Additionally, it’s important to ensure that the filter is only applied to the relevant view and not to all views in the Google Analytics account.

