GTM & GA: Using a Cookie to Identify Internal Traffic

Category : Knowledge Share

Excluding IP addresses from GA has become a hassle with remote users at every company as well as some businesses not having (or knowing if they have) a static IP address. One way around this is to identify “internal traffic” via a cookie in a user’s browser.

The cookie is set in GTM while a custom dimension is created in GA to identify browsers with that cookie installed as “internal traffic”. You then create a filter in GA that excludes users in that “internal traffic” dimension.

Once everything is configured and published, you go to any page on the site with ?internal appended to the URL, and your browser is identified as “internal traffic”: http://www.pittsburghinternetconsulting.com/?internal.

Your first pageview will be counted, but every session from then on out will be excluded until the cookie expires (365 days) or is cleared.

Note: There’s a way to do this without GTM, but it requires installing a bookmark to your browser. Blasting out the URL above to anyone who should be identified as “internal” is easier than getting everyone to install a bookmark on different browsers.

https://carloseo.com/exclude-dynamic-ip-google-analytics/