Contact salesTry for free
FreePower-ups

Custom GTM and GA4 Loader

Custom Loader helps make Google Tag Manager and Google Analytics 4 scripts more resistant to ad blockers by modifying gtag.js and gtm.js loading path. Moreover, a Custom Loader and Custom Domain help set first party cookies and prolong cookie lifetime!

How to set up Custom Loader

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

Benefits of Custom Loader

1. Sets 1st party cookies. 

2. Makes GTM and GA4 resistant to ad blockers.

3. Keeps your data tracking intact.

Use cases of the power-up

Related to this solution

Benefits of Stape hosting for server Google Tag Manager
Oct 28, 2025

Blog

Benefits of Stape hosting for server Google Tag Manager

Discover Stape's sGTM hosting advantages: power-ups for ad blocker bypass & data enrichment, auto-connect custom domains, autoscaling, API, and more.

What is server-side tracking?
Feb 19, 2026

Blog

What is server-side tracking?

Wondering what server-side tagging is and how it works? This blog post will explore all that and more!

We have more than 200 000 happy clients

Try Stape for all things server-side

What’s going on?

Where are we going?

Attention!
This is a stand-up dog zone.