Stape
Search
Try for free

Avoid the harmful impact of ad blockers on Google Analytics 4 tracking code

Updated
Jan 9, 2025
Published
Jan 8, 2025

More and more questions arise about how to make Google Analytics 4 (GA4) tracking reliable, especially with the growing influence of adblock detected bypass and Intelligent Tracking Prevention (ITP). Many users are seeking solutions on how to bypass adblock detection and maintain accurate tracking, leading to a surge in inquiries about how to get past adblock detection without compromising data integrity.

That’s why we've developed a powerful feature for our Custom Loader power-up – GA4 ad block bypass, which:

  • Activates encryption for GA4 requests.
  • Enhances the resistance of your GA4 scripts against adblock blockers bypass and ITP.
  • Protects the integrity of your tracking code and preserves valuable data.

How does “GA4 ad block bypass” work?

  1. When the Google Analytics tracking code is triggered, it gathers data about the visitors to your website.
  2. Each action or event (e.g., pageview, click, transaction) triggers a separate request to gather the information.
  3. This data can be lost if the visitor uses an ad blocker, which identifies patterns in the request URL (e.g., "/g/collect") to flag data collection. Even if you use a server-side tracking, ad blockers can still block requests using the /g/collect pattern used by GA4 events. Our “GA4 ad block bypass” encrypts these requests, making them unrecognizable to ad blockers.
  4. GA4 processes the requests by grouping individual events and associating them with the corresponding session. 

How to activate “GA4 ad block bypass”?

This feature is available for all users that are hosting server GTM container on Stape.If you don’t have a Stape account, please sign up and follow a detailed guide on how to set up server-side tracking in our blog.

1. Log in to your Stape account.

2. Open your sGTM container and choose “Power-Ups”.

3. Choose “Custom Loader”, activate the toggle, and add the following settings:

  • Domain - select the necessary domain from the list of domains connected to your container. 
  • GA4 ad block bypass - activate the toggle.
  • Same Origin Path - if you are using the same origin approach for configuring a custom domain, please specify the proxy path for requests. Learn more.
  • Platform - the Custom Loader code differs for each platform. 

Please note: If you are using apps and plugins developed by Stape, they have fields that allow the setup of Custom Loader directly within the app/plugin/extension. Please ensure you have downloaded the latest version of the app.

And if you select ‘Other’ platform, you will be given a JS code to use on your site instead of the standard GTM loader. Just generating it doesn't do anything; you also need to make the necessary changes on the website (add code) or in the Stape applications if you use any.

4. After you click “Generate” please follow the instructions on the right.

How to activate “GA4 ad block bypass”

Measure results of server-side tracking with Stape

With Stape Analytics you can observe how “GA4 ad block bypass” has influenced your Google Analytics 4 performance.

It helps to understand how many users you have with technologies that interfere with tracking (ITP and adblockers). But the number of users depends entirely on the audience that visits your site, in some cases it is 5% of the audience, in some 50%.

If you would like to activate Stape Analytics and see the value of using server side, simply go to your Stape sGTM container to turn on Analytics.

Measure results of server-side tracking with Stape

Use case

A client activated Stape Analytics in early November. Initially, they observed that only 8.55% of their website visitors were being tracked by Google Analytics 4, which corresponds to the percentage of visitors who had ad blockers preventing GA4 tracking.

results of server-side tracking with Stape

The client was losing valuable data from a significant portion of their website visitors, as users with ad blockers were not being tracked properly by GA4. This limited the accuracy of their analytics and the insights they could gain for optimizing their marketing strategies.

After activating "GA4 Ad Block Bypass" toggle within Stape's Custom Loader in late November, the client observed a significant improvement in the tracking accuracy. The percentage of website visitors with ad blockers increased to 35% on average, and these users were successfully tracked by GA4 thanks to the bypass functionality.

results of server-side tracking with Stape

Learn more about how Stape can improve your tracking:

Try Stape for all things server-sideright now!