Plugin Author
Aert
(@aahulsebos)
Hi @philwied,
You can follow this article, it has some explanation as well regarding GDPR & ePrivacy; https://complianz.io/how-to-set-google-tag-manager-after-consent-and-is-it-needed/
regards Aert
Hi!
Thank you very much. The explanation and a link in it shows me, that GTM needs always consent and how to do that. That’s very helpful.
Bit I still have questions:
- Can I set GTM script to be loaded only if there is consent for marketing? Change „data-category“ in the script which is shown in the explanation?
- Is it possible to use the Complianz Script Center to load GTM after consent to marketing?
- And if I set GTM to be loaded only after consent to marketing, all Tags in GTM are only fired after the consent correctly? So I do not need to set these custom events in GTM (cmplz_event_marketing, …) because the GTM container is loaded on marketing consent only?
Regards Philipp
Hi!
Thank you for your quick reply.
Finally I choose the option to add GTM with the Script center to be loaded by consent to marketing. Is it correct how I did it:
1. Assistent: Choose “Statistics with GTM”. “Should Complianz add GTM: NO”.
2. Script center: Add third party script without opening an closing parts, as shown below. Choose “Markteing” and replace “GTM-xxx” with my GTM ID. No placeholder is selected.
(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-xxxx’);
One question left: Where is the script now loaded? In the header, footer or body? Anything left to do?
Regards.
Hi @philwied,
Yes, that set-up looks fine indeed. The script would be loaded in the footer.
Kind regards, Jarno