On July 1, 2023, Google will officially sunset everyone's beloved Universal Analytics (UA) standard of Google Analytics in favor of the next generation: Google Analytics 4 (GA4). While Google announced the official sunset date of UA in March 2022, you might be surprised to learn that GA4 has actually been around since October 2020! Google rolled out GA4 at the height of the COVID pandemic—so it sort of flew under the radar—and has since worked diligently to add features and refine functionality ahead of its "official" launch date next summer.
GA4 overhauls GA's foundation with a new events-based tracking model juxtaposed with a refreshed UI, a (welcomed) farewell to metrics like bounce rate and a streamlined method of tracking custom events and goals—among many other nifty features. However, one exciting feature in GA4 has not received much attention among tech marketers: behavioral modeling for Consent Mode aka how to get better data when people opt out of cookies.
In our increasingly privacy-conscious world, Google's Consent Mode offers a promising glimpse into analytics and data tracking for tech marketers while respecting users' consent choices. In this blog, we'll embark on a high-level crash course of behavioral modeling for Consent Mode in GA4.
The current consent landscape: data gaps and loss
In the wake of online privacy legislation like the European Union's GDPR, tech companies raced to implement opt-in cookie banners, customizable cookie settings, consent logs and more to comply with the new regulations.
Let's focus on the current implementation of GA in line with privacy regulations. As we all know, analytics platforms like GA rely on first-party cookies to track users' engagement on a website. As the landscape stands now, if a user does not accept cookie tracking, the GA tag does not fire. Hence, no data from that user flows to GA. The result? Tech marketers have incomplete data sets and an inaccurate picture of their marketing efforts since GA only displays the data from a small subset of users who accepted tracking. Because let's face it, do we ever consent to cookies instinctually when presented with the choice?
GA4 aims to fill these gaps with its behavioral modeling for Consent Mode. However, it's meaningful for us to gain a foundational understanding of Consent Mode before diving into GA4's behavioral modeling functionality.
What Is Consent Mode?
So, let's start there! Google's Consent Mode is a feature with its GA and Google Ads global site tags (gtag.js) or tags in Google Tag Manager (GTM). In short, Consent Mode intuitively changes the behavior of the GA and Google Ads tags based on whether or not a user consents to cookies. Consent Mode currently supports five types of cookies:
- ad_storage (e.g., the Facebook Pixel)
- analytics_storage (e.g., the GA tag)
- functionality_storage (e.g., language settings for a site)
- personalization_storage (e.g., video recommendations)
- security_storage (e.g., authentication)
For this blog, we'll focus on implementing Consent Mode through GTM, as that's the most straightforward. At a high level, after enabling Consent Mode, GTM "listens" for a user's consent choice on a website. Consent Mode has a default consent choice (configurable per region) which GTM then updates based on a user's consent. For example, some implementations might have cookies enabled by default, while others, like those in the EU, require opting in.
It's critical to stress that despite its name, Consent Mode is not a Consent Management Platform (CMP). In other words, Consent Mode does not include a cookie banner for users to utilize on your website. Instead, Consent Mode waits for your existing CMP (e.g., Cookiebot) to ping a specific user's consent choice as webpages load. GTM natively integrates with a small group of CMPs, but you can also use Community Templates to apply the functionality to your existing CMP solution. We recommend consulting with a developer as this requires lots of testing to ensure the consent checks and tags fire in the correct order!
How does Consent Mode work with GA4?
When we implement a cookie consent solution for clients and test UA, we see if the UA tag fires in the right situations. If a user accepts cookies, the UA tag should fire, just as if a user denies cookies, then the UA tag should not fire. In GA4, this completely changes. The GA4 tag fires in all situations. However, the data collection and processing behaviors change based on a user's consent choice.
This might make you nervous as, at first glance, it appears it goes against current privacy regulations. But, let me explain.
If a user does not accept cookie tracking and a tech marketer enables consent mode, GTM will pass "cookieless pings" to GA4. In essence, Google will send non-personally identifiable or traceable data to GA4. This data includes:
- User agents
- Any GCLID or DCLID parameters
- Cookie consent states and CMP information
- Random numbers generated for each page load
Subsequently, GA4 captures different data with its tag depending on whether a user has consented to ad_storage and/or analytics_storage cookies. For example, if a user does not agree to analytics_storage cookies, the cookieless pings will flow through to GA for use in basic measurement and data modeling (more below) at an aggregate level. It will only include basic, non-identifiable visitor and page view information. If you're curious, Google has a great article on how its tags' behavior changes with Consent Mode based on the ads_storage and analytics_storage cookie combinations.
Modeling the missing data in GA4
In GA4, Google uses machine learning to model the data not captured by its tag for users who do not consent to cookies. In GA4, Google brings together "observed data" (i.e., data tracked with cookies) and "modeled data" into reports. As Google puts it:
"Behavioral modeling for consent mode aims at filling this data gap by modeling the behavior of users who decline analytics cookies based on the behavior of similar users who accept analytics cookies. The training data used for modeling is based on the consented user data from the property where modeling is activated."
This approach is akin to Google's Federated Learning of Cohorts (FLoC) structure for data modeling at an aggregate, cohort of users level; Google abandoned plans to roll out FloC in January. Instead, Google is currently testing a new "Topics API" within its Privacy Sandbox to replace third-party cookies.
While outside the scope of GA4, Google Ads also supports Consent Mode and can model conversions for PPC campaigns for users who do not accept cookies. The diagram Google put together below highlights the data modeling methodology to illustrate how it works in both GA and Google Ads.
Since Google uses machine learning to model the data, it needs to train the model with robust data sets. As such, not every GA4 property can utilize its behavioral modeling functionality. To qualify for behavioral data modeling, your website needs to meet the following criteria:
- Consent mode active on all pages
- Minimum 1,000 daily events from users who deny analytics_storage cookies for at least seven days
- Minimum 1,000 daily users for at least seven of the past 28 days
Additionally, Google only includes modeled data if it has high confidence in its model quality for a particular report.