Why the Consent Mode for Google Tags Is Huge for Privacy

Dionysia Kontotasiou
By
November 18, 2020 ·
Why the Consent Mode for Google Tags Is Huge for Privacy

Google Consent Mode is here and it’s a huge step forward for user privacy. In this article, I’ll lay out step-by-step instructions to help you set it up, integrate it with your A/B testing tool, and make a case for why this addition is useful for GDPR and CCPA.

With recent stay-at-home COVID-19 guidelines, millions of consumers are turning to the internet, mobile applications, or streaming devices to access content and make purchases. With this uptick in digital usage, it’s imperative for marketing professionals to effectively target and correctly identify the channels that impact the bottom line.

Google announced the new Consent Mode to help bridge the gap between advertising and privacy. In short, the consent mode is a beta feature that lets you determine whether Google’s advertising tags (Ads and Floodlight) and analytics tags (Universal Analytics, App + Web) can use browser storage when sending pings to Google’s servers.

Consent Mode is not to be confused with Additional Consent Mode, a feature that allows you to gather consent for Google ad partners that are not yet part of the Transparency and Consent Framework, but are on Google’s Ad Tech Providers (ATP) list.

This is (somewhat) in line with, for example, the General Data Protection Regulation (GDPR) and the ePrivacy Directive (ePD) in the European Union, which restrict the storage and processing of personal data (GDPR) and the storage of other data (ePD) with regard to data subjects.

This new feature standardizes the process of gathering, managing, and communicating user permissions and the way user information may be used in the advertising supply chain. Most significantly, it means that people can make choices on a per vendor and per purpose basis, and this choice will be respected in the ads that are served by all participating platforms.

With improved interoperability, publishers and marketers using Consent Mode have more flexibility and control over how they integrate and collaborate with technology partners, including Google.

The Consent Mode changes the way Google tags behave based on the consent given by website visitors.

There are two commands that are being used with the gtag (‘consent’) API:

  1. gtag (‘consent’, ‘default’), and
  2. gtag (‘consent’, ‘update’).

These two control the two new tag settings that can be sent:

TagValueDefaultDescription
ad_storage‘denied’ | ‘granted’‘denied’Whether or not to use cookies related to advertising
analytics_storage‘denied’ | ‘granted’‘denied’Whether or not to use cookies related to analytics
Tag
ad_storage

Value
‘denied’ | ‘granted’

Default
‘denied’

Description
Whether or not to use cookies related to advertising
Tag
analytics_storage

Value
‘denied’ | ‘granted’

Default
‘denied’

Description
Whether or not to use cookies related to analytics

The tag ad_storage controls cookie behavior for advertising purposes, including conversion measurement. The tag is based on the consent obtained from visitors in relation to marketing cookies.

If visitors provide consent, the tag adjusts data collection for Google’s marketing cookies.

EXAMPLE

Someone visits your website.

Google Consent Mode determines whether or not consent has been given to use marketing cookies for advertising purposes for that user.

If a user consents to marketing cookies and converts on your site, reporting continues as usual.

If a user does not consent to marketing cookies, Google tags will adjust and not use marketing cookies. You will still receive data on the conversions (pings), but at an aggregate level.

Although you may miss out on the possibility to get personal data about your visitors to be used for retargeting and personalized advertising, your website will still be able to track conversions from ad campaigns.

Google also introduced the analytics_storage tag which controls analytics cookie usage. It is similar to ad_storage, as it’s based on the consent decision made by your website visitor.

The tag adjusts data collection depending on whether the user consents to analytics/statistic cookies.

EXAMPLE

If your user accepts analytics/statistic cookies, cookies are used, and tracking will happen as usual. All data is collected by Google Analytics.

If your user does not consent to analytics cookies (and marketing cookies), no cookies related to Google Analytics are used.

However, cookieless pings are sent to Google Analytics for basic measurement and modeling purposes. This data will be aggregated and only inform you of visitors and page views, and cannot be used for retargeting.

Google Consent Mode supports several Google services used by marketing departments and websites to measure online success. The two tags, ad_storage and analytics_storage, can change the behavior of the other Google tags listed below.

As such, even with users declining cookies, you can get aggregated non-identifying data for: 

  • Google Analytics,
  • Google Ads (Google Ads Conversion Tracking and Remarketing),
  • Google Tag Manager,
  • Gtag,
  • Floodlight,
  • Conversion Linker.

A few months back, we published instructions on how to push Convert data (experience/variation names-IDs) to Google Analytics by using event tracking. Using these instructions, you can now extend this use case to include Consent Mode for Google Tags.

Here’s what the default snippet would look like. Remember, ideally, this would be positioned at the top of the page by placing the code in your Global Project Javascript area. You can also fire it through Google Tag Manager using a Custom HTML tag or a custom template, but, in that case, you must make sure that it fires before any other Google tags fire.

window.dataLayer = window.dataLayer || [];
function gtag() { window.dataLayer.push(arguments); }
gtag('consent', 'default', {
  ad_storage: 'denied',
  analytics_storage: granted,
  wait_for_update: 500,
  region: ['US-CA']
});
gtag('event', Convert Experiences, {
  'event_category' : 'Experience',
  'event_label' : 'Experience1234098_Variation1'
});

The gtag() command above sets default consent settings for visitors from California (US-CA) to deny access to advertising and accept access to analytics storage. For these users, only cookieless pings will be sent to Google servers for ads while for analytics cookies can be stored.

Immediately after, another gtag() command can send the Convert event and notify for the same visitor which experience/variation is bucketed into, thus allowing for combining analytics with Convert data in your Google account.

Getting Started

Google Consent Mode is not a consent management platform. For Consent Mode to be effective, you need to already have a system or solution in place for collecting and dealing with user consent.

If you’re interested in getting started with Consent Mode, please reach out to your Google account team. Implementing Consent Mode requires adding a few lines of code above your global site tag or Tag Manager container.

To help with this process, Google has partnered with several Consent Management Platforms. A few of them are already integrated with Consent Mode and are ready to help.

Convert has partnered with Civic, a digital solutions provider that implements Consent Mode.

Consent Management Platforms that are already integrated with Google Consent Mode.
Consent Management Platforms that are already integrated with Google Consent Mode.

Have any questions or concerns? Reach out to our team to get started with Consent Mode.

Get a Taste of One of the Most Privacy Aware A/B Testing Tools Out There
Get a Taste of One of the Most Privacy Aware A/B Testing Tools Out There

Originally published November 18, 2020 - Updated November 10, 2022

Mobile reading?

Scan this QR code and take this blog with you, wherever you go.

Authors
Dionysia Kontotasiou
Dionysia Kontotasiou

Convert's Head of Integration and Privacy, helping customers with technical queries.

Editors
Carmen Apostu
Carmen Apostu

In her role as Head of Content at Convert, Carmen is dedicated to delivering top-notch content that people can’t help but read through. Connect with Carmen on LinkedIn for any inquiries or requests.

Start Your 15-Day Free Trial Right Now.
No Credit Card Required

You can always change your preferences later.
You're Almost Done.
I manage a marketing team
I manage a tech team
I research and/or hypothesize experiments
I code & QA experiments
Convert is committed to protecting your privacy.

Important. Please Read.

  • Check your inbox for the password to Convert’s trial account.
  • Log in using the link provided in that email.

This sign up flow is built for maximum security. You’re worth it!