Closed twslade closed 2 years ago
ill check the above tomorrow when testing the template
OK I just checked and it is correct, basically the template currently isn't working because the consent-state does not reflect user choices.
Besides, google analytics etc, must be set upon consent, this part also currently does not work.
@twslade please do a PR with improvements I made a simple one with URL fix
Hi Onetrust team,
Our team at Elevar have been working extensively with consent mode in GTM. We've found that most CMPs aren't designing their GTM web templates in a way that is compatible with GTM making our merchants lose many hits that should be going to marketing channels.
From Google's Docs
The Consent Initialization trigger is designed to help you ensure that all consent settings are honored before any other triggers fire. The Consent Initialization trigger is used for tags that set or update the user consent state for your site, such as a consent management platform tag or tags that set consent defaults.
The problem I see with the current solution:
- User visits homepage. Consent initialization fires with default state (assume everything is denied) https://github.com/jmpate/ot-cmp-gcm-template/blob/bc2e295ace2f62b72ca423f9c36cdd9cb49b19f0/template.tpl#L159-L166
- User adjusts consent to "Allow all". Onetrust consent update fires
- User clicks to another page.
- Consent initialization fires with default state as it did in 1
- Data layer pushes occur. Many of the configured tags in GTM do not fire because they fail the consent test which actually isn't the user's choice.
- Onetrust Consent update fires
There is a timing issue here. Any persisted consent across page loads should be fired on consent initialization instead of arbitrarily firing depending on load. This can be easily achieved using cookies.
I see a few paths forward here:
- We will manage our own version of this Onetrust template that utilizes Onetrust's cookies to initialize consent properly.
- We will manage another tag that reads the Onetrust cookies above and sets consent
- We can create a PR to fix this issue.
@twslade @jmpate
jmpate, when will you push my pr live?
twslade if we don't hear from jmpate i think we should make a fork of this code and improve it with my simple url change, and your coding to have full support i have a large danish global customer who can use this, also ill be curious to see how you improve the code or i might do it, but not sure by the way why do you assume that the onetrust team made this template?
twslade if we don't hear from jmpate i think we should make a fork of this code and improve it with my simple url change, and your coding to have full support
@simonmadsen the changes were actually more involved than we expected because of listening for changes from Onetrust required access to addEventListener
on the window which wasn't possible in GTM's templates :disappointed:. From what I can tell, the template API's don't support it.
To get around this we had to actually implement a custom HTML tag that would handle setting consent via updateConsentState
template API.
There is another issue too with how OneTrust handles auto blocking. If we inject the OneTrust via GTM then the auto blocking will not work as expected because of load order issues. I personally feel like blocking should be handled in GTM and not in OneTrust, but I thought it was worth mentioning.
why do you assume that the onetrust team made this template?
Purely an assumption and I am probably wrong :smile:
Hello @twslade & @simonmadsen
Updates will be coming to this template soon. Please stay tuned.
Ok at least use my PR with correct url?
From: jmpate @.> Sent: Monday, June 6, 2022 4:42:57 PM To: jmpate/ot-cmp-gcm-template @.> Cc: simonmadsen @.>; Mention @.> Subject: Re: [jmpate/ot-cmp-gcm-template] GTM Consent Mode - Incompatibility (Issue #2)
Hello @twsladehttps://github.com/twslade & @simonmadsenhttps://github.com/simonmadsen
Updates will be coming to this template soon. Please stay tuned.
— Reply to this email directly, view it on GitHubhttps://github.com/jmpate/ot-cmp-gcm-template/issues/2#issuecomment-1147527062, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJ7WVCXN7JKWIV4IHXF6B3VNYE7DANCNFSM5TY7IFWA. You are receiving this because you were mentioned.Message ID: @.***>
@jmpate (@twslade) shall we assign a timeslot for this and look together? jmpate i know you guys can do it yourself, but im just trying to facilitate here. it would take more time for me to do it than you, and it is your product, i would like to see what you do, but i can just see the code when it's there
i have a client waiting for this
@simonmadsen we integrated this into our product https://app.getelevar.com/. I can give you access to our container if that would help. This will make it so that GTM consent mode works.
@simonmadsen we integrated this into our product https://app.getelevar.com/. I can give you access to our container if that would help. This will make it so that GTM consent mode works.
thx @twslade i know getelevar is a great product, i just hope @jmpate replies for one just foucsing on this part also
Hey - my team is working on this. We had some disruption due to company re-structuring.
Hey - my team is working on this. We had some disruption due to company re-structuring.
do you have an idea of an ETA? @jmpate
I am working with a client who uses your software, and I want to offer them this improvement which I believe is easier and will give all pageviews data and all conversions but not all traffic sources for those conversions because they will still be missing for people who dont consent for conversions happening after the thank you page and will need to be scaled up to get an accurate picture of traffic source attribution
@jmpate just checking here
@simonmadsen Thanks for checking in, expect an update EOW
Great!
Fra: jmpate @.> Sendt: Wednesday, July 6, 2022 3:39:28 PM Til: jmpate/ot-cmp-gcm-template @.> Cc: simonmadsen @.>; Mention @.> Emne: Re: [jmpate/ot-cmp-gcm-template] GTM Consent Mode - Incompatibility (Issue #2)
@simonmadsenhttps://github.com/simonmadsen Thanks for checking in, expect an update EOW
— Reply to this email directly, view it on GitHubhttps://github.com/jmpate/ot-cmp-gcm-template/issues/2#issuecomment-1176235124, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJ7WVBCK3P6ZISZF54A6S3VSWEBBANCNFSM5TY7IFWA. You are receiving this because you were mentioned.Message ID: @.***>
@jmpate does this still apply? meaning did you do some work last week and will it release this week?
@jmpate just checking here again
@jmpate also been following this thread and wondering if there's an update?
Hello @simonmadsen @jordanspilker - I apologize for the delay - In working with our Google partners, there are additional requirements we need to meet. These will all be made together. Please look for an update next week.
@jmpate @twslade @jordanspilker any update on this?
@jmpate @simonmadsen checking in again
@jmpate @twslade @jordanspilker a co-consultant on this actually implemented the consent themselves. i think it basically works with this cmp here but you 'just' have to define the default consent and a waiting time of 2000 ms, google it and you will find it
still i think it should be part of this git though
thanks @simonmadsen. are you concerned with missing page views or other events that happen in those 2 seconds before the wait time expires?
Not sure. Just waiting for onetrust to update their template
From: jordanspilker @.> Sent: Tuesday, September 27, 2022 10:48:35 PM To: jmpate/ot-cmp-gcm-template @.> Cc: simonmadsen @.>; Mention @.> Subject: Re: [jmpate/ot-cmp-gcm-template] GTM Consent Mode - Incompatibility (Issue #2)
thanks @simonmadsenhttps://github.com/simonmadsen. are you concerned with missing page views or other events that happen in those 2 seconds before the wait time expires?
— Reply to this email directly, view it on GitHubhttps://github.com/jmpate/ot-cmp-gcm-template/issues/2#issuecomment-1260031824, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJ7WVEA7H4RQGTRO6JQBO3WANMSHANCNFSM5TY7IFWA. You are receiving this because you were mentioned.Message ID: @.***>
Hi Onetrust team,
Our team at Elevar have been working extensively with consent mode in GTM. We've found that most CMPs aren't designing their GTM web templates in a way that is compatible with GTM making our merchants lose many hits that should be going to marketing channels.
From Google's Docs
The problem I see with the current solution:
There is a timing issue here. Any persisted consent across page loads should be fired on consent initialization instead of arbitrarily firing depending on load. This can be easily achieved using cookies.
I see a few paths forward here: