Using Google Consent Mode v2 with Shopify
This article explains how Littledata integrates with Google's Consent mode v2.
What is Google Consent Mode v2?
Google Consent Mode v2 is the latest version of Google Consent mode, that allows web and app developers to limit data collection on user consent choices.
From March 2024, all advertisers wanting to run personalized Google Ads to users in Europe must use Consent Mode v2.
You can read more about Consent Mode on Google.
How does Littledata work with Google Consent Mode?
Littledata integrates automatically and seamlessly with Consent Mode v2 via Shopify Customer Privacy API. This includes Advanced Consent Mode, sending cookieless pings to Google servers even if the user does not accept consent, so Google can better model and predict your non-consenting traffic.
There is one switch to flip first: Consent mode must be enabled on your Google Analytics connection. It is off by default on new connections, and everything else is handled for you once it is on.
Turn on Consent mode first
While Consent mode is off, Littledata sends no consent default or update commands to Google and tracks every shopper as if consent had been granted, no matter what your cookie banner shows.
Enable Consent mode on your Google Analytics connection before relying on any of the behaviour described below.
Most Shopify cookie banners and some Consent Management Platforms (CMPs) support this Customer Privacy API.
Enabling Consent mode
In the Littledata dashboard, go to Connections
Select your Google Analytics destination
Open the General tab
Enable Consent mode, tick I understand in the confirmation modal, and save
There is a single Consent mode setting per destination — there is no separate, GA4-only Consent Mode v2 toggle. See data pipeline settings for the other settings on this tab.
Which connection controls the Google tag
Google Analytics and Google Ads share the same Google tag on your store, so only one connection sets its consent state:
If you have a Google Analytics connection, its Consent mode setting controls the whole consent state — including the advertising parameters
ad_storage,ad_user_dataandad_personalization. Turning Consent mode on for Google Ads while GA4 is connected has no effect on the tag.If you have no Google Analytics connection, your Google Ads connection takes over and its own Consent mode setting applies.
Mapping of Shopify consent types to Google
Shopify’s Customer Privacy API supports four consent types.Google Consent Mode v2 tracks customer consent as four different properties, which switch their state depending on the preferences that the customer has chosen within the Shopify cookie banner or CMP:
Google Consent Mode Parameter
Shopify Consent Type
ad_storage = granted
marketing = yes
ad_user_data = granted
marketing = yes
ad_personalization = granted
marketing = yes
analytics_storage = granted
analytics = yes
The first 3 parameters (those that pertain to advertising) will change their status when marketing consent is accepted or denied, while the last parameter will change based on analytics consent.
Depending on what the user has accepted or declined, a consent update could look like this:

Consent Mode v2 adds 2 new parameters to the consent states, those being:ad_user_data and ad_personalization.
Advanced Consent Mode and Modeling
Unlike Basic Consent Mode, which only allows data collection from users who explicitly grant consent, the Advanced Mode collects data from users who do not grant explicit consent, thus enabling a more comprehensive data collection process. To go more in-depth here's an article on how to check if a website implements Google Consent Mode V2 properly.

When consent is denied, the Google Analytics library will still load and send events, but these will be sent as cookieless pings. This allows Google to collect and model data without relying on cookies, ensuring compliance with user consent choices while still enabling valuable insights through advanced data modeling.
This modeling includes Google Ads consent mode modeling, Google Ads online modeling, Google Analytics conversion modeling, and Google Analytics behavioral modeling.

With Advanced Consent Mode store owners can rest assured that their tracking efforts are in line with privacy standards while still being able to obtain valuable information about their users. This is a significant step forward in data tracking and privacy.
Last updated
Was this helpful?