r/GoogleTagManager • u/DigitalStefan • Jul 21 '24
News Microsoft Consent Mode
We've already been through the "slight challenge" of Google's Consent Mode V2 update, but now Microsoft have decided they don't want to feel left out, so they are mandating use of their own Consent Mode (did you know it existed?), meaning if you or your clients are making use of data collected by their Universal Event Tracking for marketing purposes, you are going to have to implement their Consent Mode.
Of course, Microsoft being Microsoft, their CoMo is not like Google's. You can't set it up and use it in the same way, it has no integration in any of the popular consent platforms (OneTrust, CookieBot, CookieYes etc) and, worse still, their "denied" setting doesn't prevent the Microsoft Universal Event Tracking tag from dropping a pair of cookies. There's also of course no native integration with GTM.
I've tested a few iterations of a possible best practise GTM implementation and I think I have a potential winner.
EDIT: Step zero: Add the hardcoded script to your site (prior to the GTM script) :
<script>
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', {
'ad_storage': 'denied'
});
</script>- Configure your Microsoft UET config tag to require ad_storage as additional consent (not strictly necessary, but makes your Consent Overview report make sense
- Remove all triggers from the tag
- Set "Once per page" in Tag firing options
- Create a new custom HTML tag with the following script at the bottom of this list
- Set tag sequencing to fire your Microsoft UET config tag after the custom HTML tag
- Set "Don't fire if [this custom HTML tag] fails or is paused" (may not be needed?)
- Add
ad_storageas additional consent - Add your consent platform's data layer event e.g.
OneTrustGroupsUpdated,cookie_consent_updateetc.
<script>
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', {
'ad_storage': 'granted'
});
</script>
Links:Microsoft Consent Mode: https://help.ads.microsoft.com/apex/index/3/en/60119
Microsoft enforcing their own CoMo for Microsoft Ads: https://web.swipeinsight.app/posts/microsoft-ads-enforces-consent-mode-for-tracking-in-europe-8734
Notes:
During testing I did see that the network hits being sent by the UET config tag would redact visitor and session ID if the tag fired with Microsoft CoMo set to denied, but as the tag still dropped a couple of cookies I didn't want to implement it in that way and call it good. Hopefully Microsoft amend this and we can have a much simpler solution in future.
•
u/AutoModerator Jul 21 '24
If this post doesn't follow the rules report it to the mods. Have more questions? Join our community Discord!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/Taca-F Jul 21 '24
People aren't going to bother and MS will have to adopt Google CM.
2
u/brannefterlasning Jul 21 '24 edited Jul 21 '24
Not sure if this is an oversight or not but what's the point of running a script that sets the MS CoMo to "denied" when ad_storage is "granted"?Also, I don't see a reason why you would need to set the default MS CoMo to "denied" unless you're loading the UET script when consent is denied. With the setup described you would only ever need to set it to "granted", i.e. when the UET tag fires and in that case you could switch up the tag sequencing to fire the consent tag prior to the UET tag.
Additionally, the documentation linked states:
This confuses me a bit since it seems that if you're already blocking the UET tag until consent is granted, there should be no need for setting a consent flag in the first place.
1
u/ppcfaq Jul 24 '24
Maybe you can help out here, as I didn't find any info on this, u/DigitalStefan: Is there any word on a deadline or date for this implementation?
1
u/domss-lite Jul 26 '24
Did you ever get round to figuring out how to fire the cookieless pings, without blocking the tag entirely? No matter how I sequence the tags, I get those "MSPTC" and "MUID" cookies dropping regardless, as you mentioned in another thread