GTM Troubleshooting

Solutions for common issues with our Google Tag Manager integration.

Updated over a week ago

The cookie banner isn't loading on my site

First, verify if Google Tag Manager is loaded on your site.

The following script should be present in your site's code:

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXXXXX');</script>

In addition, a script with the URL https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXXX should be present on your site after it loads.

A script with the URL https://www.googletagmanager.com/gtag/js... is not Google Tag Manager. Scripts with this URL load Google Analytics, which may or may not be loaded with GTM.

Second, verify the tag configuration for the Enzuzo Cookie Banner.

Check the "Tag Configuration" of the Enzuzo cookie banner tag in GTM. The script URL should be of the format https://app.enzuzo.com/scripts/cookiebar/<account ID>. It should not have quotes or <script> tags.

The tag should be configured to fire on consent initialization.

Also, under "Advanced Settings" > "Consent Settings", the tag should be set to "No additional consent required".

My Google Analytics traffic isn't what I expect

Verify your Google Tag configuration

Unlike 3rd party (non-Google) scripts, the Google tag has built in consent checks. Ensure the Google tag is set to "No additional consent required" and that it is set to trigger on "Page Initialization" (or a similar trigger).

Verify your Google Analytics data modeling

To comply with privacy law, Google Analytics sends cookieless pings with no personal information if consent isn't granted. This may affect your traffic since Google Analytics cannot track user sessions in this mode.

Google Analytics attempts to compensate for this by modeling unconsented traffic. However, depending on your traffic, you may not be eligible. Check the Google help documentation for more information and how to determine your eligibility.

My 3rd party scripts are not firing when expected

Verify your tag triggers

Ensure that your 3rd party scripts are configured to fire on the enzuzo_consent_update data layer event. They should be using a custom trigger configured as in the picture:

My scripts/cookies are not being blocked correctly

Move your scripts into Google Tag Manager

The Enzuzo cookie banner cannot block scripts/cookies that are written before the banner loads. Since Google Tag Manager loads tags asynchronously, your scripts may load before the cookie banner, even if the script is after Google Tag Manager on your website.

To fix this, move your 3rd party scripts into Google Tag Manager, and set them to fire on the enzuzo_consent_update event. This will ensure that they are only run after the banner loads.

I'm seeing a warning about consent signals in Google Analytics

GA4] Verify and update consent settings in Google Analytics - Analytics Help

If you see the preceding warning about consent, it means that Google Analytics is not receiving the new consent signals for consent mode v2. Ensure you have downloaded the latest version of the banner from our configuration tutorial.

Also, follow these steps to ensure that your banner is loading correctly. If you have recently set up our Consent Mode integration, it may take 48 hours for Google to recognize the consent signals.

I'm seeing the warning "a tag read consent state before a default was set"

This error is likely because your GTM tags are loading in an incorrect order.

Make sure your tags are loading in the correct order

The Enzuzo cookie banner tag should be triggered on "Consent Initialization" or a similar event. Google tags like the Google Tag or a Conversion Linker tag should be triggered on "Page View", "Initialization" or a similar event.

Did this answer your question?