-
AuthorPosts
-
June 27, 2023 at 10:52 am #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
July 9, 2023 at 5:25 pm #1412882Hey 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,
MJuly 18, 2023 at 4:56 pm #1413619Hi 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
July 18, 2023 at 8:29 pm #1413642Hi,
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,
RikardAugust 3, 2023 at 11:06 am #1415320Hi 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
August 3, 2023 at 8:49 pm #1415366Hi,
Do you have any documentation on how that code is supposed to be added and where?
Best regards,
RikardAugust 15, 2023 at 11:17 am #1416328Hi 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.
August 15, 2023 at 6:45 pm #1416359Hi,
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,
RikardAugust 22, 2023 at 1:37 pm #1416856Hi,
If I put the code in the functions.php, how can I turn off the cookies with the enfold cookie banner?
Best regards
August 22, 2023 at 3:22 pm #1416864Hi,
I’m not sure about that unfortunately, did you try the suggestions which Mike posted earlier?
Best regards,
RikardAugust 29, 2023 at 4:40 pm #1417461Hi,
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.September 2, 2023 at 3:52 pm #1417878Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.