Google Tag Manager Tip #2: Exclude cookiebot traffic

A Consent Managment Platform like Cookiebot is ideally suited to work with Google Consent Mode. Cookiebot allows you to fire the pixels within your Google Tag Manager account at the time when the user’s consent is known and thus also takes into account marketing cookies.

Creating an account is easy through this link. We can then offer a substantial discount of 20% on your monthly fee for 3 years. But after you install cookiebot on your website, you will soon notice that you get a big spike in traffic in your Google Analytics 4 account. That has to do with Cookiebot scanning your website at least once a month for new or changed cookies on your website.

Very annoying, because this soon leads to an inexplicably high traffic and users in a day. So how do you avoid this? You’ll read about that in this tip.

After you install Cookiebot in Google Tag Manager, unfortunately within the tag you cannot prevent this. For that, you will have to set up a data filter.

You can find a current list of IP addresses used by Cookiebot to do the scans on cookiebot’s website. Be sure to create an account and start following this page, as the addresses are updated regularly.

Despite the fact that the article is precisely about whitelisting Cookiebot, we are now going to do the opposite.

Step 1:
Go to your GA4 account and go to Admin settings.

Step 2:
Within the admin settings, go to the “data streams” section. Click open the stream that is active and proceed to Set Tag Settings.

Step 3:
Then click “show more” and then choose “Define internal traffic.”

Step 4:
Create a new rule and name it cookiebot_traffic. For the parameter, you can choose default ‘internal’ or give it your own name. Below, enter all IP addresses from the list mentioned on cookiebot’s page. If necessary, create a 2nd list.
Remember what you named the parameter, “internal” or “cookiebot_traffic.

Step 5:
Close the windows and within the admin section go to “data filter”
Add a new line there and name the parameter after the one you chose above. ‘Internal’ or ‘cookiebot_traffic’.
Then set the filter to ‘active’

What is the difference between “Active and Testing”?

With an active filter, all traffic is excluded from inclusion in the GA4 profile. Then you won’t see that traffic in your reports. If you choose to set it to “Testing,” the traffic is not actively excluded, but you can filter the traffic. In fact, there is a custom dimension that you can turn on in a report called ” Name test data filter”. If you add it as a secondary dimension then you will see which traffic and events come from IP addresses that appear in your filter. Very handy if you want to check this.

How do you keep the reports clean?
So basically the traffic is not filtered, if the filter is still on “Testing. So then you will have to make a copy of the report where you exclude this filter manually so yourself. Right now, unfortunately, there is no other method for that.

Should you want to know more about working with filters in Google Analytics 4, or need help implementing this, or want to get started with Cookiebot? If so, please contact us.

Author: Paul Gudde

Function: Founder

Active since: 2007

Number of items: 24

LinkedIn profile

Specializations: Google Analytics, Google Tag Manager, Google Ads, Google bigquery, Server Side Tagging

Let’s Make Things Happen

“Take the step to data enrichment today. Make the most of Google Analytics by leveraging our specialist knowledge.”

“Thanks to Paul’s implementation, we were finally able to get insight from Analytics to come up with actions. Paul clearly has experience in b2b marketing and puts us as a customer first in doing so”

Luuk van Dorp

Sales marketer WEX

Free Support & Advice Request

Attributions needs the contact information you provide to contact you about our products and services. You can unsubscribe from these messages at any time.