← All resources Product

Standard vs Enhanced GTM loader scripts

Measurebase can generate two types of client-side loader for your website. Both route traffic through your tagging subdomain — the difference is how the script is loaded, and which one Generate script picks for you by default.

Standard loader

The standard script follows Google's standard GTM pattern, but loads gtm.js from your subdomain instead of googletagmanager.com:

https://mbase.yoursite.com/gtm.js?id=GTM-XXXXXXX

Use this when you want the closest match to Google's documentation, or when debugging with GTM preview mode is a priority.

Enhanced loader

The Enhanced script uses a masked loader path unique to your domain, with your container ID passed as a ?mb= query parameter:

https://mbase.yoursite.com/AWqBDp0Nqj.js?mb=XXXXXXX

This pattern is harder for ad blockers and browser privacy filters to fingerprint. It replaces your standard GTM snippet entirely — do not run both at the same time. It's selected by default in Generate script, since it's the right call for most sites.

With the Enhanced loader installed, you can also turn on Enhanced Ad Blocker Protection for the domain (Advanced Tracking tab). It rewrites every request the container fires afterwards — not just the initial script load — into the same masked format, so ad blockers can't fingerprint them by their usual fixed paths. Requests are decoded back to normal before they reach your server container, so nothing changes on the receiving end.

Server container setup

Both versions require a Google Tag Manager: Web Container client in your server container with your web container ID listed under Allowed Container IDs. Without this client, the browser will load the script but events will not be accepted.

Which should you choose?

You can generate either version from the domain view in your Measurebase dashboard under Generate script.

Continue reading

Ready to move your tagging to Europe?

Start free, no credit card required. Live in about 15 minutes.

Start free