Bypass AdBlockers Legally: The "Custom Loader" Technique for GTM

Published by Thomas dans la catégorie Best Practices Last update : 09.01.2026 à 12h28


Table of content

It's a statistic that hurts marketing managers in Switzerland: about 30% of your visitors use an ad blocker (AdBlocker) like uBlock Origin, AdBlock Plus, or Ghostery.

Specifically, this means that for a third of your audience, Google Tag Manager doesn't even load. Before you can even ask for consent or trigger a tag, the browser has cut the line.

Result: Your remarketing audiences are diminished, your conversions underestimated, and your CPA (Cost per Acquisition) artificially inflated.

But AdBlockers are not infallible. They work in a binary and predictable manner. At A-Track, we use an advanced technique called the Custom Loader (Custom Loader) to make your tracking invisible to blockers while remaining fully compliant with the nFADP.

Here’s how we recover that 30% of lost data.

How Does an AdBlocker Work? (The Flaw)

To understand the solution, you need to understand the opponent. AdBlockers are not artificial intelligences. They are simple filters that compare your site's network requests to a public blacklist (often "EasyList").

They block anything that looks like:

Their weakness? They block the Name of the file or the Domain, not the content of the script.

The Solution: The Custom Loader (The Chameleon)

The principle of the Custom Loader is to mask the identity of Google Tag Manager.

Instead of asking the browser to load the standard gtm.js file from Google's servers, we will:

  1. Use your own subdomain (e.g., load.votreclient.ch).

  2. Rename the gtm.js file to something random and harmless (e.g., x98k2.js or app-utils.js).

Result: The AdBlocker sees a request going to yourclient.ch/app-utils.js. It thinks it's a functional script from the site (necessary for operation) and lets it through. Once loaded, this script executes GTM normally.

Implementation via Stape.io: The "Power-Up" for Agencies

Setting up a Custom Loader manually requires solid skills in Cloud Functions and routing. It's heavy to maintain.

That's why at A-Track, we use the infrastructure of Stape.io which has industrialized this process.

Step 1: The Tracking Server (SST)

We configure a Server-Side container on a custom subdomain (data.votreclient.ch). This is the foundation.

Step 2: Activating the "Power-Up" Custom Loader

In the Stape interface, we activate the "Custom Loader" feature. Stape will generate a unique path for your GTM container.

Step 3: Updating the Source Code (Snippet)

This is the only intervention required on the site. We replace the standard GTM code snippet in the <head> of the site with the new modified code that points to our disguised file.

Legality and Ethics: The Red Line Not to Cross

This is the most important point for your Swiss clients concerned about their reputation.

"If we bypass the AdBlocker, are we forcing tracking?"

The answer is NO. And this is where the nuance lies between "Black Hat" (illegal) and "White Hat" (A-Track).

  • The Custom Loader is used to load the tool (GTM). It allows the container to exist on the page.

  • The CMP (Cookie Script) manages consent. Once GTM is loaded, it strictly respects the user's choice.

If the user has an AdBlocker BUT accepts cookies on your banner, we track them. If they have an AdBlocker AND refuse cookies, we do not track them (or only anonymously/without cookies).

The Custom Loader is not meant to violate consent; it is meant to prevent third-party software (the AdBlocker) from dictating its technical law on your own website.

Business Impact: +15% to +30% of Recovered Data

This is not theory. On installations carried out by A-Track in French-speaking Switzerland, we see an immediate increase in event volume:

  1. GA4 Visibility: You regain the actual traffic of your site ("Tech" users are no longer invisible).

  2. Facebook Conversions: The fbevents.js script (Pixel) is also proxied via Server-Side, so it slips through the cracks.

  3. Reliability of Attribution: You better understand which channels actually bring sales.

A-Track Expert Advice

The Custom Loader is particularly effective for B2B and Tech sites. Why? Because the audience of these sites (developers, engineers, executives) is the one that uses the most AdBlockers. On a computer hardware sales site, the impact can reach +40% of recovered data!

Is your audience technical? You are likely losing 30% of your stats.

Don't let uBlock Origin decide your marketing strategy. Take back control of your infrastructure.

Ask A-Track to deploy a resilient Custom Loader for your site.

Secure my tracking against AdBlockers