Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1411810

    Hi, ich möchte in Zukunft den Google Tag Manager auf meiner Website nutzen. Ich weiss bereits, dass ich den GTM Code in der functions.php einsetzen muss, da man den GTM body-tag nicht über die Enfold Einstellungen einsetzen kann. Aber wie kann ich dann die GTM Cookies mit dem Enfold Cookie Banner blockieren?

    Liebe Grüße

    ——

    Hi, I would like to use the Google Tag Manager on my website. I already know that I have to use the GTM code in the functions.php because you can’t use the GTM body tag via the enfold settings. But then how can I block the GTM cookies with the enfold cookie consent banner?

    Best regards

    #1412882

    Hey Blatze,
    Thank you for your patience, please see our documentation Additional Custom Cookies
    but please note that due to browser security limitations, it might not be possible to remove them using JavaScript or PHP.
    The only thread I found about GTM cookies seems to have ended unsuccessful.
    Other users seem to have a good experience with the Borlabs cookie plugin, perhaps it could be used similarly for GTM?

    Best regards,
    M

    #1413619

    Hi Mike,

    Thanks for your answer. I was able to solve the problem:
    I used the script for the <head> in the themes settings under Google Services and placed the code for the <body> in functions.php. In this way, the cookie consent tool can still prevent the cookies.

    Best regards

    #1413642

    Hi,

    Great, I’m glad that you found a solution, and thanks for sharing. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

    #1415320

    Hi Rikard,

    recently the code in the <head> is no longer displayed. Even if I allow all cookies. I noticed this because I couldn’t connect to the website with the tag manager.

    Best regards

    #1415366

    Hi,

    Do you have any documentation on how that code is supposed to be added and where?

    Best regards,
    Rikard

    #1416328

    Hi Rikard,

    I pasted the code here: Enfold Theme Options > Google Services > Google Analytics > Google Analytics Tracking Code.
    Actually, the code should appear between <head> and </head>. But he is not to be found there.

    Best regards.

    • This reply was modified 1 year, 3 months ago by Blatze.
    • This reply was modified 1 year, 3 months ago by Blatze.
    #1416359

    Hi,

    You can try adding it using a function in functions.php instead:

    
    function blatze_gtm(){
    ?>
    YOUR SCRIPT GOES HERE
    <?php
    }
    add_action('wp_head', 'blatze_gtm');

    Best regards,
    Rikard

    #1416856

    Hi,

    If I put the code in the functions.php, how can I turn off the cookies with the enfold cookie banner?

    Best regards

    #1416864

    Hi,

    I’m not sure about that unfortunately, did you try the suggestions which Mike posted earlier?

    Best regards,
    Rikard

    #1417461

    Hi,
    Can someone take a closer look at the error? We would like to continue using the Enfold option to place the Google code in the header so that we can continue to use the Enfold cookie banner. I can provide you with access.
    Best regards.

    #1417878

    Hi,
    It looks like the Google Analytics field can not handle the GTM script, it is not designed for the GTM script.
    I don’t know of a way to allow users to disable the GTM script because it doesn’t seem to use cookies, so our cookie documentation doesn’t help.
    I believe the the Borlabs cookie plugin offers the ablity to wrap scripts and disable them, I have not used this plugin but from what I have read this is the case.
    Otherwise if you would like to request a GTM feature, the Dev Team has opened a new Github Feature Request for users to place requests and follow them as the Dev Team reviews them.

    Best regards,
    Mike

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