Contact salesTry for free

Avoid the harmful impact of ad blockers on your website tracking code

Ivanna Holubovska

Ivanna Holubovska

Author
Updated
Mar 20, 2026
Published
Jan 8, 2025
Also available in
Bypass adblockers
Bypass adblockers

More and more questions arise about how to make Google Analytics 4 (GA4) tracking reliable, especially with the growing influence of adblock detected bypass. 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. Approaches like Google Analytics cookieless tracking are also gaining attention, as businesses look for ways to preserve data quality while adapting to stricter privacy standards.

That’s why we've developed a powerful feature for our Custom Loader power-up – Enhanced ad blocker protection, which:

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

How does “Enhanced ad blocker protection” 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 for GA4, ad blockers can still block requests using the /g/collect pattern used by GA4 events. Our “Enhanced ad blocker protection” 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 “Enhanced ad blocker protection”?

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.

2. Select your sGTM container on the dashboard.

sGTM containers

3. Click Power-ups, then click the “Use” button next to the Custom Loader panel.

Power-ups section in Stape account

4. Toggle the Custom Loader switch.

Turn on Custom Loader

5. Configure Custom Loader with the following settings:

  • Domain - choose one of the domains linked to your container. 
  • Web GTM ID - paste your web Google Tag Manager ID.
  • Enhanced ad blocker protection - when this option is enabled, all your requests to the server sGTM will be encrypted so that ad blockers cannot block them based on request patterns.
  • Same Origin Path - If you have the same origin configured, specify the path used, and both GTM and GTAG JS will be loaded via the same origin. Learn more about the same-origin approach for server GTM here.
  • Platform - the web GTM code differs for each eCommerce platform. If you are using Stape applications for CMS, select the platform from the list. Otherwise, select the “Other” option to generate a JS snippet. You can find out more about Stape Conversion Tracking apps for CMS on our page.
Custom Loader configuration screen

Test the setup of Custom Loader

To check if everything works correctly, right-click on any website page → click Inspect → open the Network tab. Then, enter your custom subdomain or the same origin path if used. 

If everything is correct, you should see the Google Tag Manager request URL and “200 OK” Status Code.

Below is an example of encrypting the GA4 request with the active Custom Loader and enhanced ad blocker protection toggle:

With a loader example

And here is what it looks like without the Custom Loader and without enhanced ad blocker protection configured:

Example without Loader

Ad Blocker Info

While Custom Loader helps you bypass blockers, Ad Blocker Info power-up shows you how many of your visitors actually use them. It adds a header to every sGTM request and returns true if an ad blocker is on, and false if not.

This way, you see the real share of traffic that hides ads and decide if you need to change ad placements or budget.

Note: Ad Blocker Info only works once the Custom Loader is active.

Measure results of server-side tracking with Stape

With Stape Analytics you can observe how “Enhanced ad blocker protection” has influenced your Google Analytics 4 performance.

It helps to understand how many users you have with technologies that interfere with tracking (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
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
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 "Enhanced ad blocker protection" 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
Results of server-side tracking with Stape
i

Case study: 20% of data recovered from tracking prevention | Peak Metrics

  • Challenge: losing a massive volume of critical user data due to ad blockers and browser limitations like Safari's Intelligent Tracking Prevention (ITP).
  • Solution: server-side tracking implementation via Stape using a custom subdomain (e.g., sgtm.yoursite.com) and identifier backups to route data securely through a resilient, first-party server environment.
  • Results: successful recovery over 20% of data blocked by ITP and 3.3% blocked by ad blockers, including a 30.6% recovery of lost purchase events during a 10-day test.

Learn more about how Stape can improve your tracking:

Want to start on the server side?register now!

author

Ivanna Holubovska

Author

Ivanna is a Lead Content Manager at Stape and a certified author on Clutch and KyivPost. She writes high-quality content on server-side tracking to help businesses optimize strategies and analytics.

Comments

Try Stape for all things server-side

What’s going on?

Where are we going?

Attention!
This is a stand-up dog zone.