How to Enable & Implement Consent Mode in GA4

NAPKYN UPDATE - 03/20/2024

Napkyn has published an updated version of this blog! You can access the most up-to-date information on this topic here.


 

February 17, 2023 - Back in October we wrote a post about Google Consent Mode.  If you’re new to Consent mode, you may want to check out that article first, it explains more basic information about it including what it is, what it does, and benefits of using it. In this article I dig deeper into some of the best practices for implementing and using it. 

  

    To start, let’s look at how Google Consent Mode works in GA4 and Google Tag Manager:

     

     

    When looking at the above image it’s important to note that  GA4 does not automatically resend. In order to resend, you will need to fire GA4 config tag after consent mode once again. This is contrary to Universal Analytics and Google Ads where tags do automatically resend a full request after consent.

    How to Enable and Implement Consent Mode?

    Before you can enable Consent Mode, you’ll first need to ask for your website visitors’ consent. This is done with a consent banner. Consent banners can be added to websites via a number of third-party programs or a custom HTML tag deployed in Google Tag Manager (GTM). Once a banner has been added to the website, you can enable Consent Mode in GTM. 

    Go to GTM, navigate to Admin > Container Settings > Additional Settings > Enable Consent Overview

    Best Practices Tip:  When enabling Consent Mode, we recommend utilizing a GTM template provided by the CMP provider. If you don’t use GTM can still take advantage of Consent Mode, but it will  require  using a gtag.js or a custom HTML snippet as an alternative. Keep in mind, both of these  methods will require you to  add new code to every page on your website, which is why we don’t recommend this approach. 

    More About Cookie Consent Banners in GA4

    What is it? 

    A cookie banner is a notice that appears on a web page (usually in the footer). When a user visits the page it informs them that the site uses cookies, and provides instructions on how to refuse or accept those cookies.

    Is Explicit Cookie Consent Always Mandatory? 

    No. If you use GA4 with IP anonymization and do not share users’ data with other Google products, you do not need to receive explicit Cookie Consent. However, if you do not use IP anonymization or share GA4 data with Google Ads or Google Signals, then you need to obtain active users’ consent by providing a Cookie Banner.

    What Happens When I Implement a Cookie Consent Banner?

    When you implement a consent banner for your website or app, Analytics will be missing data for users who decline consent. 

    How Can I Replace Missing Data?

    Consent mode receives users’ consent choices from cookie banners or widgets and dynamically adapts the behavior of Analytics, Ads, and third-party tags that create or read cookies. When visitors deny consent, instead of storing cookies, tags send pings to Google. If you are using Google Analytics 4, Google fills the data collection gaps with conversion modeling and behavioral modeling. 

    Behavioral modeling for consent mode uses machine learning to model the behavior of users who decline analytics cookies based on the behavior of similar users who accept analytics cookies. Modeled data allows you to gain useful insights from your Analytics reports while respecting your users’ privacy. Modeled data allows you to gain useful insights from your Analytics reports while respecting your users’ privacy. Google’s behavioral modeling approach relies on modeling data rather than observed data. Modeled data is based on existing patterns of behavior from users who have already interacted with the website or app in question. As users interact with the website or app over time, the model can learn and adjust accordingly.

    Machine Learning underlying Behavioral Modeling estimates data based on user and session metrics (e.g. daily active users) that may not be detectable when cookies or user_id are not available.

    How can I  see modeled data in reports?

    To see modeled data in reports, choose the Blended reporting identity. 

    In GA(Google Analytics), click Admin > Property > Reporting Identity > Blended

    How Behavioral Modeling Appears in GA4

    First of all, the Admin of your GA4 property will be able to manage the modeling through the Report Identity: it will then be possible to choose between UserID> Google Signals> ID device> Modeled and ClientID.

    Secondly, the modeled data will be visible within the reports in a window similar to this:

    How to activate Behavioral Modeling in GA4

    To start, it is necessary to set and activate the Google Consent Mode correctly. Then the following requirements must be met:

    • Record at least 1,000 daily events with analytics_storage = ‘denied’ for at least 7 days.
    • Register at least 1,000 daily users who send events with analytics_storage = ‘granted’ for at least 7 of the previous 28 days.

    Are there limitations?

    Yes, there are limitations to behavioral modeling, in particular they do not apply to:

    • Audiences
    • Real Time reports and cards with real time data
    • Explorations with the exception of the free-form
    • Segments
    • Predictive Metrics and Data export

    With the help of Behavioral modeling you’ll gain  the ability to extrapolate meaningful insights from your user base (like how users interact with your website or app) even when you don’t have access to observed data due to privacy restrictions or other issues. This means  you can still learn about your users without compromising their privacy or breaching GDPR and other regulations. 

    Learn More About Consent Mode with Napkyn

    As you can see Google Consent Mode offers many different benefits for marketers and organizations. If you require help with implementing Google Consent Mode, contact us, we’d love to help.

     

    Latest Articles

    Ricardo Cristofolini July 3, 2024
    Shreya Banker, Data Scientist June 20, 2024
    Ricardo Cristofolini June 10, 2024

    Ready to grow your company to the next level?

    Do you require help with implementing Google Consent Mode?

    Graphics