For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using Google Consent Mode v2 with Shopify

This article explains how Littledata integrates with Google's 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.

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.

Most Shopify cookie banners and some Consent Management Platforms (CMPs) support this Customer Privacy API.

For Consent Mode to work you must have a cookie banner. You can set it up from your Shopify Admin by going to Settings -> Customer Privacy -> Cookie Banner, or use another banner app that is compliant with Shopify Customer Privacy API.

  1. In the Littledata dashboard, go to Connections

  2. Select your Google Analytics destination

  3. Open the General tab

  4. 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.

Shopify Markets

If the Shopify Markets module is enabled, destination settings are held per market, and that includes Consent mode. Enabling it for one market does not enable it for the others, and a market that is deleted and re-created in Shopify comes back with factory settings. Check the setting in every market you sell into.

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_data and ad_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.

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 parameters

Consent Mode v2 adds 2 new parameters to the consent states, those being:ad_user_data and ad_personalization.

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.

Basic consent mode vs advanced consent mode

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.

Modeled data in GA and Google Ads

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?