In this article you will learn about:

  1. Introduction to Google Consent Mode

  2. Benefits of using it

  3. Services Supported by Google Consent Mode

  4. Enable the integration

  5. Advanced settings

    1. Consent types

    2. Redact ads data

    3. URL passthrough

    4. Custom consent event

Introduction to google consent mode

With our application's integration to the Google Consent Mode you can respect the privacy choices of end-users with minimal impact on your store's ad-based revenue stream, analytics, and more. Learn more about Google Consent Mode here.

If you're already using Google gtag.js or Google Tag Manager (GTM) on your store, we recommend that you enable the Google Consent Mode integration to your store, to ensure you get the best use of your Google Services. If you don't have GTM installed, we do this for you from inside our application by just adding your property ID. Learn more on how it works here.

There are some data (pings) that Google collects in order to make it work properly. More details about the data gathered by Google Consent Mode can be found here.

Benefits of using it

Once you have enabled the integration for your store, our application will automatically signal the consent choices of your visitors to Google instead of blocking tags when not consented. The end user's granular consent will be used by Google to adjust tag behavior accordingly.

With the Google Consent Mode and our app's integration in place, will let our application allow tags to run and Google will act e.g. re-marketing and log analytics data according to the signal sent by our app.

Google describes the technical details of how supported tags changes behavior based on the end user's consent here.

With this integration, you can get valuable insights from campaigns and measure conversions while respecting users' consent choices. Google Consent Mode is a step toward honoring the privacy of individual users without altering the foundation of the digital economy.

Services Supported by Google Consent Mode

Google Consent Mode supports the search engine’s most prominent marketing platforms, including:

  1. Google Ads

  2. Google Tag Manager

  3. Google Analytics

  4. GTag

  5. Conversion Linker

  6. Floodlight

It works behind the scenes to make sure that these core platforms provide the same powerful insights while maintaining privacy compliance.

Enable the integration

The activation of Google Consent Mode integration can be done in a single step.

Just navigate to Settings > Integrations

Switch on the integration and some options will open.

Here you have two options:

  1. Install Google Tag Manager and/or Google Analytics for me
    This is appropriate if you have not yet installed Google Tag Manager (GTM) and/or Google Analytics (GA). With this option, our application will add the appropriate snippet code which is needed in order for GTM and/or GA to work for your store as long as the initialization code for the consent mode.
    Here you can check the GTM and/or the GA and then you can add the corresponding properties.

  2. I have already installed Google Tag Manager and/or Google Analytics

    This is appropriate if you have already installed Google Tag Manager (GTM) and/or Google Analytics (GA). With this option, our application will only add the appropriate code to initialize the consent parameters that Google requires for this integration.

In order for the integration to work properly, you will need to add the integration script on the top of your theme in order for the appropriate code to run first from any other script on your store. Instructions about it can be found at the top of this page.

Based on these instructions you need to follow the steps:

  1. Navigate to the active Theme.

  2. From the top bar, select more actions (three-dots) and then click on the Edit code

  3. From the list of Layout assets, select the main theme.liquid to open in the editor

  4. Make sure that you copy the following code snippet and paste it just after the <head> tag at the top of the head section of your theme so that it loads before any other script in your theme.

    <!-- Pandectes tag-rules: place always first on your head section --> <script src="{{ 'pandectes-rules.min.js' | asset_url }}"></script>

    So it will look like this:

  5. Click Save to update the file.

Advanced settings

Consent types

By default, Google Consent Mode supports five consent types. Our application maps these consent types into categories. In most cases, you do not have to change the mappings.

Google supports the following types to adjust the behavior of Google tags on your store:





'denied' | 'granted'

Controls whether your tags will use cookies related to analytics.


'denied' | 'granted'

Controls whether your tags will use cookies related to advertising.


'denied' | 'granted'

Controls whether your tags will use cookies related to functionality.


'denied' | 'granted'

Controls whether your tags will use cookies related to personalization.


'denied' | 'granted'

Controls whether your tags will use cookies related to security.

The default value of these types is based on the banner mode you have selected.

Redact ads data

When ad_storage is denied, new cookies will not be set for advertising purposes. Additionally, third-party cookies previously set on and will not be used except for spam and fraud purposes. Data sent to Google will still include the full page URL, including any ad click information in the URL parameters.

To further redact your ads data when ad_storage is denied, you can check the ads_data_redaction option.

When ads_data_redaction is checked and ad_storage is denied, ad click identifiers sent in network requests by Google Ads and Floodlight tags will be redacted. Network requests will also be sent through a cookieless domain.

The ads_data_redaction parameter will have no effect when ad_storage is granted.

URL passthrough

When a user lands on your store after clicking an ad, information about the ad may be appended to your landing page URLs as a query parameter. In order to improve conversion accuracy, Google tags usually store this information in first-party cookies on your domain.

However, if ad_storage is set to denied, Google tags will not save this information locally. To improve ad click measurement quality when ad_storage is denied, you can optionally elect to pass ad click information through URL parameters across pages using URL passthrough.

Similarly, if analytics_storage is set to denied, URL passthrough can be used to send event and session-based analytics (including conversions) without cookies across pages.

The following conditions must be met in order to use URL passthrough:

  • The outgoing link refers to the same domain as the current page's domain.

  • A gclid/dclid is present in the URL (Google Ads and Floodlight tags only)

When using URL passthrough, a few query parameters may be appended to links as users navigate through pages on your website:

  • gclid

  • dclid

  • gclsrc

  • _gl

  • wbraid

For best results, ensure that:

  1. Redirects on your site pass all the above query parameters.

  2. Your analytics tools ignore these parameters in-page URLs.

  3. These parameters do not interfere with your store's behavior.

Custom consent event

By enabling the custom consent event, you can take advantage of the consent information from inside your Google Tag Manager. This means that you can use this even information to handle scripts inside your GTM.

The event is pushed in the dataLayer property which can be modified to any desired name.

Some detailed information about this event are listed below.

Event name: Pandectes_Consent_Update

Categories mapping:

  • C0000: Strictly necessary

  • C0001: Functionality

  • C0002: Performance

  • C0003: Targeting

Allowed values:

  • event_status: allow, deny, mixed, revoke

  • category_status: allow, deny

A sample code of this event is the following:

"event": "Pandectes_Consent_Update",
"pandectes_status": "<event_status>",
"pandectes_categories": {
"C0000": "allow",
"C0001": "<category_status>",
"C0002": "<category_status>",
"C0003": "<category_status>",

Did this answer your question?