Stape
Free

Custom GTM and GA4 Loader

Custom loader helps make Google Tag Manager and Google Analytics 4 scripts more resistant to ad blockers and ITPs by modifying gtag.js and gtm.js loading path.

Using a custom loader and custom domain helps set 1st party cookies, prolong cookie lifetime and make the web Google Tag Manager and Google Analytics script resistant to ad blocking apps and algorithms. 

Custom loader power-up is available on any plan. To enable it, all you need to do is log in to your stape.io account, open container power-ups and add a WEB GTM ID. Once done, you will see the modified Google Tag Manager and GA4 requests in console. 

How to set up custom loader:Copy link to this section

1. Log in to you stape.io account

2. Open sGTM container -> Click Power Up.

3. Click Config Custom loader power-up -> add your WEB GTM ID -> You will see updated web GTM code -> Copy this web GTM script and add or replace existing web GTM script on your site.

custom loader to make gtm and ga4 scripts resistent to ad blockers
custom loader to make gtm and ga4 scripts resistent to ad blockers

4. Once you've updated web GTM code and set up ss GA4, you can check modified GTM and GA4 requests in network. 

Google Tag Manager request URL should look like this:

Tagging server URL/stape container identifier.js?st=web GTM ID without letters GTM

In my case, it's https://load.gtm.stape.dog/covxbvwx.js?st=PMVQSJH

custom GTM loader

GA4 request URL should look like this:

Tagging server URL/gt+stape container identifier.js?id=GA4 identifier....

In my case, it's https://load.gtm.stape.dog/gtcovxbvwx.js?id=G-0SME9XLYER

custom GA4 loader

Benefits of custom loader:Copy link to this section

    1. Sets 1st party cookies. 

    2. Prolongs cookie lifetime.

    3. Makes GTM and GA4 resistant to AdBlockers and ITP's.

    4. Keeps your data tracking intact.

Host your GTM server at Stape