Ad blocking is in no way a one-way street, and the impact of tracking script blocking extends far beyond just advertisements.
Many have been made about ad blocking apps and extensions these days, but what do they really do for users? One reason why people might consider installing adblokers on their device or browser is because of annoying ads and pop-ups that appear on the sites. But not only ads can be affected by ad blockers.
In this post, we will discuss how ad blockers can affect tracking scripts of Google Tag Manager and Google Analytics 4. We will also show how to avoid GTM and GA4 blocking by ad blockers using server-side tracking.
This post is not encouraging anyone to track users without their permission. You should always respect user decisions and ask for their consent before firing any tracking scripts.
Some people might use GTM for non-tracking purposes (like implementing schema markup or adding a chat on the site). If GTM is blocked, it might negatively impact organic rankings or customer experience.
Lately, the functionality of ad blockers has expanded. Now they not only block advertising banners but also the analytics scripts (including Google Analytics) and marketing (Meta, Google Ads, etc.), leading to the loss of crucial data for any business.
AdBlock technology works based on shared lists called filter lists, which determine which content should be blocked or hidden and which content can be shown on the visited pages. These lists are lists of URLs that belong to either allowed lists or blocked lists.
According to PageFair Adblock Report 2020:
Another study shows that in 2020 26.5% of US citizens used ad blockers. This number grows by 1% each year starting from 2017. It means that your Google Analytics is losing around 27% of data about your website users.
Ad blockers are software or browser extensions that can alter or remove advertising content from websites. It can block advertising, tracking, and other content using different methods. One of the methods is by targeting the URL where this content originated.
By default, most ad blockers prevent only ads from being shown. It can be done either by knowing the URL of the advertising network (because of a specific database of URLs that is part of advertising networks) or using the names of tags in the code.
The default setup of the ad blockers won’t hurt Google Analytics 4 or Google Tag Manager. They will block only ads on the page that the user visits.
But users can adjust settings and ask ad blockers to remove any tracking scripts. In this case, Google Tag Manager won’t work. It means that all scripts added inside the Tag Manager won’t work. If you add Google Analytics 4 scripts outside of Google Tag Manager, it will be blocked as well.
In the past few years, more and more people have been using ad blockers to escape advertisements. Since advanced settings of ad blocker can affect GTM, your tags will be affected too. People might not even know that when they enable the advanced setting of ad blockers, they might block, for example, the ability to contact support via chat on the site.
One of the best ways to prevent GA4 and GTM blocking is moving to the server GTM container. We are saying “best” because, with server-side tagging, you will have many other benefits, not only ad blockers and ITP prevention.
During the last several years, most people who work with the websites were using a web GTM container. The latter is well-known and is used on a significant number of websites. The difference between server and web containers is in the loading method. The server container loads pixels from the server, and the web container loads pixels in the browser.
The main advantages of moving from the web to the server container are:
So, to avoid GTM and GA4 blocking with the help of server-side tracking, you need to follow the steps below:
2. Log in to your Stape.io account and choose a container → Click Power-ups → Click Config near the Custom Loader.
3. Configure the Custom Loader. Select the domain that you want to load gtm.js and gtag.js. Paste your Web GTM ID. To bypass ad blockers' impact on the GA4 tracking code enable the toggle and select the platform you use.
Once you’ve clicked update, you will see a modified GTM code that you’ll need to update on your website.
4. Update the GTM code on your site with the GTM code you copied on the previous step.
Enable ad blocker and use the console to check if GTM and GA4 are loaded.
For example, here's what a typical GA4 event request looks like without custom loader power-up if you just use server_container_url:
It is easily blocked by ad blockers using the /collect pattern.
And below is an example of a typical GA4 request using Stape Custom Loader and active ‘GA4 bypass’ function. The whole request is encrypted, without any patterns that ad blocker can block.
And below is an example of a typical GA4 request using Stape Custom Loader and active ‘GA4 bypass’ function.The whole request is encrypted, without any patterns that ad blocker can block.
Google Tag Manager is not a tracking tool by design and can be used for many other purposes other than tracking user behavior on the site. That is why blocked GTM can negatively impact not only Google Analytics 4, Facebook, or any other tracking tool but can go far beyond it.
In this case, server-side tracking is a handy tool that helps avoid GTM and GA4 blocking by ad blockers.
Check these blog posts if you want to implement server-side tagging for your site:
If you have any questions about setting up the server GTM container on your website, do not hesitate to contact us by submitting a request.
You can do it for free at Stape! Click Try for free and explore the advantages!