Skip to content
FunnelGuard

Fix guide by FunnelsGuard

GTM blocklist or allowlist blocking tags: how to find and fix it

TRK-118Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

GTM has a security feature that lets the site owner decide which kinds of tags and variables a container may use. It is set in the page code, in the dataLayer, before the GTM snippet loads. The allowlist says "only these types may run". The blocklist says "these types may not run".

Types are named with short codes, such as html (Custom HTML), img (Custom Image), jsm (Custom JavaScript variable), ua (old Universal Analytics) or gclidw (Conversion Linker). If a tag in your container uses a blocked type, GTM skips it. The tag looks fine in the workspace and may even fire in Preview on a page without the restriction.

The restriction is often added by a developer or an old agency for security or privacy reasons and then forgotten. A CMS plugin or a consent tool can also add it.

Example: a restriction placed before the GTM snippethtml
<script>
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    'gtm.blocklist': ['html', 'customScripts', 'jsm']
  });
</script>
<!-- Google Tag Manager snippet comes after this -->

Why it costs you leads or sales

Blocked tags do not report errors on the page. Your conversion tag, pixel or remarketing code simply does not run. Ad platforms then see fewer conversions, so bidding and reporting get worse, and you may not notice for weeks. The leads still arrive, which is why the business impact is usually low, but your numbers will be wrong and campaigns may be optimised on poor data.

Where a blocked tag type breaks the chain
  1. Visitor submits formLead is created as normal
  2. GTM trigger matchesTrigger conditions are met
  3. Tag type checkedCustom HTML is on the blocklist
  4. Pixel hit sentNever happens
  5. Ad platform conversionNot recorded

The visitor converts, but the tag type is blocked so no hit leaves the page.

How to check if your site has it

Find a tag-type restriction
  1. Search the page source

    Open the live page, view source and search for gtm.allowlist and gtm.blocklist. Any match above the GTM snippet is a restriction.

  2. Check the dataLayer in the console

    In browser dev tools, run dataLayer.filter(x => x['gtm.allowlist'] || x['gtm.blocklist']). It returns the restriction objects, if any.

  3. Use GTM Preview

    Open Tag Assistant Preview on the live URL. Tags that did not fire appear under Tags Not Fired. Compare their types with the list you found.

  4. Search your theme, plugins and tag code

    Look in the theme header, any plugin that injects scripts and any consent tool for the same keys, since they can add the restriction.

Common type codes you may see in a restriction
CodeWhat it covers
htmlCustom HTML tags
imgCustom Image tags
jsmCustom JavaScript variables
customScriptsAll custom scripts (HTML, image, JavaScript variable)
nonGoogleScriptsTags from vendors other than Google
gclidwConversion Linker
awctGoogle Ads Conversion Tracking

How to fix it

The fix is to change the restriction so the tag types you actually use are allowed. Do not simply delete a security rule if someone added it on purpose. Ask why it exists first.

Where to change the restriction
  1. Find the snippet

    Locate the dataLayer.push with gtm.allowlist or gtm.blocklist in your template, above the GTM snippet.

  2. Edit the list

    Remove the needed type from gtm.blocklist, or add it to gtm.allowlist. Remove the whole push if it is no longer needed.

  3. Deploy and clear caches

    Publish the change and purge any CDN or page cache.

How to confirm it's fixed

Confirmation checks
  • View source on the live page and confirm the restriction no longer lists the needed type
  • Open GTM Preview on the live URL and confirm the tag now appears under Tags Fired
  • Check the network tab for the request to the ad or analytics platform
  • Complete a test conversion and see it in the platform's real-time or test events view
  • Test on more than one page template, since restrictions can be added per page

How to prevent it happening again

Prevention habits
  • Document any allowlist or blocklist with who added it and why
  • Keep the restriction in one place in the code, not scattered across plugins
  • Re-test key tags after theme changes, plugin updates and agency handovers
  • Before adding a new tag type in GTM, check whether a restriction covers it
  • Review conversions in ad platforms weekly and investigate sudden drops

How FunnelGuard handles this

FunnelGuard does not check for GTM allowlists or blocklists today. It is a possible future check. It does not read your page code for these keys.

What FunnelGuard does do is run your real customer journeys on a schedule and check the tracking hits sent to ad and analytics platforms such as GA4, Google Ads and Meta. If a blocked tag stops a hit from being sent, that missing hit is the kind of symptom those checks look at, but FunnelGuard would not tell you the cause is a restriction. You would still need the steps above to find it.

To watch for it yourself, search your page source for gtm.allowlist and gtm.blocklist after every theme or plugin change, and compare conversions in each ad platform against your CRM. FunnelGuard has a Free plan with 1 site and 2 journeys, and paid plans have a 3-day free trial.

Questions people ask

Why is my GTM tag not firing even though the trigger is correct?

One possible cause is a tag-type restriction. If the page sets gtm.blocklist or gtm.allowlist before the GTM snippet, tags of a blocked type are skipped silently. Search the page source for those keys and check Tag Assistant for tags under Tags Not Fired.

What is gtm.blocklist in Google Tag Manager?

It is a dataLayer setting that lists tag, trigger or variable types that GTM must not run on that page. For example, listing html stops all Custom HTML tags. It must be set before the GTM snippet loads.

What is the difference between gtm.allowlist and gtm.blocklist?

The allowlist permits only the listed types and blocks everything else. The blocklist permits everything except the listed types. If both are set, the blocklist takes priority for any type that appears in both.

Why are my Custom HTML tags blocked in GTM?

The page probably has html or customScripts in gtm.blocklist, or it has an allowlist that does not include html. A developer, plugin or consent tool may have added it. Find it in the page source and decide whether to change it.

How do I check if my site has a GTM allowlist or blocklist?

View the live page source and search for gtm.allowlist and gtm.blocklist. You can also run a filter on dataLayer in the browser console to find the objects. Check several page templates.

Is it safe to remove a GTM blocklist?

Only if you know why it was added. Restrictions can limit damage if a container is misused. Allow just the types you need, rather than removing every rule.

Does FunnelGuard detect GTM allowlist or blocklist problems?

No, not yet. It is a possible future check. FunnelGuard does check tracking hits during scheduled journeys, but it does not inspect for this setting or name it as a cause.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.