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.
<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.
- Visitor submits formLead is created as normal
- GTM trigger matchesTrigger conditions are met
- Tag type checkedCustom HTML is on the blocklist
- Pixel hit sentNever happens
- 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
Search the page source
Open the live page, view source and search for
gtm.allowlistandgtm.blocklist. Any match above the GTM snippet is a restriction.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.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.
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.
| Code | What it covers |
|---|---|
| html | Custom HTML tags |
| img | Custom Image tags |
| jsm | Custom JavaScript variables |
| customScripts | All custom scripts (HTML, image, JavaScript variable) |
| nonGoogleScripts | Tags from vendors other than Google |
| gclidw | Conversion Linker |
| awct | Google 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.
Find the snippet
Locate the
dataLayer.pushwithgtm.allowlistorgtm.blocklistin your template, above the GTM snippet.Edit the list
Remove the needed type from
gtm.blocklist, or add it togtm.allowlist. Remove the whole push if it is no longer needed.Deploy and clear caches
Publish the change and purge any CDN or page cache.
Search theme and plugins
Search
header.php,functions.phpand your GTM or header-script plugin forgtm.blocklistorgtm.allowlist.Edit the source
Change the list in the plugin setting or child theme. Avoid editing a parent theme, since updates overwrite it.
Clear caching
Purge your cache plugin so visitors get the new header.
Open the theme code
Go to Online Store, Themes, Edit code and search
theme.liquidforgtm.blocklistorgtm.allowlist.Edit and save
Adjust the list so the needed types are allowed. Also check any custom pixel or app that injects GTM.
Check custom code
In Site settings, Custom code, look at Head code (and page-level custom code) for the restriction.
Edit and publish
Update the list and publish the site, as custom code changes only go live on publish.
Look for the source in GTM
If a Custom HTML tag fires on Consent Initialization or Initialization and pushes the restriction, edit or pause it.
Remember the timing
Restrictions must be set before GTM loads, so a tag pushing them is usually a sign of a mistake. Prefer setting them in page code.
Publish
Submit and publish the new version.
How to confirm it's fixed
- 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
- 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.
Related issues
- TRK-115Custom HTML tag throwing JavaScript errorFix guide
- TRK-111Tag paused in GTMFix guide
- TRK-116Tag firing in preview but blocked by consent settings in liveFix guide
- TRK-117Built-in consent checks misconfigured in GTMFix guide
- TRK-103Workspace changes never published (tag in preview only)Fix guide
- TRK-113Variables returning undefined (dataLayer key renamed)Fix guide