• I first have to say that I might not have a full understanding of how GTM works and what all the possibilities are. But I’ve done some research and I think my idea is possible. If it doesn’t make sense, please let me know (or just ignore me ?? )

    I know GTM4WP just pushes data layers etc etc. But could you please consider the following ?

    Let’s say I have several tags in my tagmanager set up. Some are functional/analytical, and other are for tracking users.

    To comply with GDPR I have to block tracking tags until the visitor accepts them.

    There are plenty of plugins around which almost all have the same behavior. Example: Check whether cookie with name “Consent Given” is set to “True”. If yes, don’t show notice. If no, show notice and ask for permission. The permission is stored in the cookie I mentioned above.

    Now, in GTM we have the ability to add exceptions to tags. So we can add a condition and if this condition is true, the tag may be fired.

    With all this data we have we could technically do the following. If you can add the feature to specify a cookie name and value. Then we can add that to a datalayer. Example:

    `
    if cookie “Consent Given” exists AND isset to “True”{
    dataLayer.push({‘event’: ‘consent_given’});
    }
    `

    GTM uses this datalayer to confirm that consent has been given or not. This will then be used as exception for the tracking tags.

    This way, we can use any cookie plugin we want as long as it stores the user preference in a cookie.

    Ideally, but probably much more work for you, GTM4WP would have its own built-in cookie consent functionality where the above scenario is applied.

    Anyways, I’d love to hear what you think of this idea.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Your idea is great but in most cases unnecessary.
    There is another variable type inside GTM: 1st party cookie

    Most consent banner/popup solutions store the level of consent into a cookie. Depending on what solution you are using, this can be a 0 or 1 or 2, etc but I’ve seen cookie consent solutions that store texts like functional or statistical or advertising, etc.

    What you need to do is to read this consent cookie with GTM’s own 1st party cookie variable and then customize your triggers and tags to fire based on the consent of your visitor.

    Thread Starter johnny538

    (@johnny538)

    Thanks for the super fast reply!

    I didn’t know about the 1st party cookie feature in GTM. But I’ll definitely take a look.

    Maybe it’s a good idea to mention this on your blog?

    Thanks again!

    Plugin Author Thomas Geiger

    (@duracelltomi)

    The paradox in this situation is that mostly GDPR is the reason why I haven’t got time to write about that ??

    Thread Starter johnny538

    (@johnny538)

    Did you have time to document this yet ? I’d really like to set this up using my current cookie plugin. I have the cookie name and the value of the cookie when it’s accepted. I just struggle with implementing the check in GTM.

    UPDATE: Just wanted to add that my cookie plugin supports custom scripts that are only shown when the consent is given. So I could custom push a datalayer and use it as trigger in GTM.

    • This reply was modified 6 years, 9 months ago by johnny538.
    Thread Starter johnny538

    (@johnny538)

    OK I got it working. In the custom script section of the cookie plugin I placed:

    <script>
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
    ‘event’: ‘consent_given’
    });
    </script>

    And then I used the event ‘consent given’ as trigger for the tags

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Idea for better GDPR compatability’ is closed to new replies.