Support » Plugin: Complianz - GDPR/CCPA Cookie Consent » Google Tag Mgr: _ga, _gat and _gid placed before consent given

  • Resolved MrMattEastwood


    Hello, Complianz team! We’re in Germany (DSGVO/GDPR) and our client is using Google Tag Manager on their website. I configured it as follows:

    Statistics > Do you compile stats?
    > Yes, with Google Tag Manager

    More information?
    > All 3 checked (DPA accepted, Google not allowed to use data for other services, IP address acquisition blocked)

    Tag manager fires scripts which place cookies
    > Yes

    Now, on the cookie banner, there’s a “functional cookies” checkmark and no others:

    In addition, the following 3 cookies are placed before consent is given:

    I’m a complete Google Tag Manager noob, so I’m just wondering if this behaviour is ok? Does the way our client configured GTM make it GDPR-compliant to place those cookies without consent?

    Or is something misconfigured? I followed your guide to Tag Manger and Complianz and think I did everything correctly.


    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support jarnovos


    Hello @mrmatteastwood,

    Have you also set “Do you target visitors from Germany and/or Austria?” to Yes (Wizard > Visitors)?

    It seems like there is one more implementation of Google Tag Manager on the website, aside from the one implemented using Complianz. This is the code implemented by Complianz: I would advise removing the other implementation(s) of GTM.

    As for your question about GTM loading before consent: an empty GTM container will be initalized before consent, but will only be populated after the correct consent-type has been received.

    Hope this helps.
    Kind regards,

    Thread Starter MrMattEastwood


    Hey jarnovos, thanks for your quick response! This is enlightening.

    Indeed, I manually put the GTM tracking codes into my child theme’s header.php into the <head> tag and right at the beginning of the <body> tag. I’ll remove those and see what happens. (won’t get around to it before tomorrow though).

    Yup, we did set it to visitors from Germany/Austria.

    Will report back.

    Thread Starter MrMattEastwood


    Hello Jarnovos and Complianz team,

    My apologies for not responding sooner. I removed the custom header.php from my child theme, so now, only the implementation code set by Complianz towards the end of the code is left.

    The three cookies are no longer set before consent is given. After giving consent, they’re not set either:

    Will GTM work at all now without any cookies being placed?

    I’m wondering one more thing. The code I received from the client came with specific instructions to implement a part of it in the <head> tag, and another snippet in the <body> tag like so:

    Is any functionality getting lost by implementing it through Complianz?

    Plugin Contributor Aert Hulsebos


    Hi @mrmatteastwood,

    3 things:

    1. Google Tag Manager now seems to be installed correctly.
    2. The second script is a pixel, that will be used when someone doesn’t allow javascript to be executed in their browser. If this is the case, GTM will not work without this pixel, but then consent won’t work either, and many other on-site functionalities. This is a specific browser setting, and very rare to be enabled. When this happens consent will default to functional only. I have never come across this besides AMP, but this has its own implementation.
    3. You can go to cookie banner settings, and add your own Google Tag Manager categories. However…Marketing should always be standard, and I’m not sure why your banner does not have this category by default.

    Could you check the wizard, Cookies – Integrations and see if you said Yes to at least one of the following: Third-Party, Social Media or Advertising?

    Let me know!

    regards Aert

    Thread Starter MrMattEastwood


    Hey Aert, it looks like my mistake was indeed that I didn’t check the right boxes during the Integration section. As you said, I can choose third-party services (but then, GTM is not among the ones presented), as well as social media content and advertising cookies.

    I think out of the 3, only “third party” makes sense, right? GTM, to my knowledge, has nothing to do with social media embedding or advertising?

    So I just went ahead and ticked “yes” on that, but chose none of the available services.

    The “Marketing” checkbox is now there, but none of the ga_, _gat and _gid cookies are placed, neither before consent is given nor afterwards.

    Plugin Contributor Aert Hulsebos


    Hi @mrmatteastwood,

    Regarding: “The “Marketing” checkbox is now there, but none of the ga_, _gat and _gid cookies are placed, neither before consent is given nor afterwards.”

    This is the case for me.

    Please do the following:
    1. Go to Cookie banner settings and add “Statistics” as Google Tag Manager category.
    2. Fire the Analytics tag in GTM with a custom event called cmplz_event_0..

    This should be it.

    regards Aert

    Thread Starter MrMattEastwood


    Thanks, Aert!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.