If you’re using server-side Google Tag Manager, Google (Advanced) Consent Mode and you’re collecting hits to Google Analytics 4, you might have noticed something odd happening when switching consent to granted state.
It looks as if your page_view hits as well as any other hits marked as “Conversions” (or key events now, I guess) are automatically redispatched to the server-side Google Tag Manager endpoint when consent is granted!
This sounds incredibly useful.
This will be a quick tip, but it’s here to correct my previous statements in the comments section of different articles on this blog.
When using Advanced Consent Mode, Google Analytics 4 collects hits when consent is in "denied" state. These hits have a lot of parameters stripped off them, including identifiers like the Client ID and the Session ID.
The hits will not surface in reports directly, but they will instead go through a modeling process to enrich the reports once modeled.
**Last updated March 7, 2024. Clarified that you do NOT need to resend hits when consent is granted, if those hits were collected on the same page when consent was denied.
Google’s Consent Mode continues to be a hot topic, especially since in 2024 it will be required to implement Consent Mode in case a website or app is collecting data for audience building or remarketing with Google’s advertising services.
Note! This is about the original version of Consent Mode. While the content is still very valid and you should read through it to understand how it works, Google has since released a “V2” update with additional consent signals. You can read about Consent Mode V2 here. . Not too long ago, Google announced a new consent mode for Google tags. It allows you to build a mechanism where Google’s tags parse, react, and respond to the consent status of your site visitors.