✨Google Consent Mode V2 Integrated
Last updated
Last updated
The Google Consent Mode Integration feature within the app provides a seamless way for merchants to implement Google's Consent Mode on their e-commerce platform. This feature allows merchants to respect user consent for cookies, ensuring compliance with data protection regulations while still enabling the collection of critical analytics and ad performance data.
Merchants can configure Google Consent Mode directly from app's admin: Settings/Integration/ Google consent mode by following these steps:
Consent Parameters Selection: Choose from the list of consent parameters which ones to apply. Options include:
ad_storage
: Enables storage related to security such as authentication functionality, fraud prevention, and other user protection.
ad_user_data
: Sets consent for sending user data related to advertising to Google.
ad_personalization
: Sets consent for personalized advertising.
analytics_storage
: Enables storage (such as cookies) related to analytics e.g. visit duration.
security_storage
: Enables storage (such as cookies) related to analytics e.g. visit duration.
functionality_storage
: Enables storage that supports the functionality of the website or app e.g. language settings.
personalization_storage
: Enables storage related to personalization e.g. video recommendations.
ads_data_redaction
: When ad_storage is denied, new cookies will not be set for advertising purposes. Additionally, third-party cookies previously set on google.com and doubleclick.net 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.
url_passthrough
: Passing ad click, client ID, and session ID information in URLs.
Based on the merchant's selection, the app will generate the necessary code snippets. These snippets are designed to be compatible with Consent Mode v1 and v2, adhering to the latest updates as outlined in Google's documentation.
Once the relevant options are selected and the code is generated, merchants can integrate Consent Mode by following these steps:
Code Copying: Copy the generated code snippet provided by the app.
Theme File Editing: Access the theme.liquid
file within the website's theme editor.
Code Pasting: Paste the copied code snippet just after the opening <head>
tag.
Save Changes: Save the changes made to the theme.liquid
file to ensure Consent Mode is active.
Upon integration of the generated code into the theme.liquid
file, the app will default all Google Consent Mode parameters to a 'denied' state. This ensures that no data is collected without the explicit consent of the user.
When a user visits the merchant's website, they will be prompted to provide consent for various categories of cookies, including:
Marketing Cookies: Related to advertising and marketing efforts.
Analytics Cookies: Used for collecting data on user interaction and behavior.
Functionality Cookies: Essential for certain website features and personalization.
If the user provides their consent:
Consent Update: The app will update Google Consent Mode to 'granted' for the cookie categories the user has accepted.
Consent Storage: The user's preferences are stored in a cookie on their device, ensuring that their choices are remembered for future visits.
Automatic Consent Application: On subsequent visits, the app will automatically read the stored cookie and apply the user's preferences without requiring them to consent again.
With this feature, merchants can manage user consent for cookies in a way that is compliant with privacy laws, user-friendly, and minimizes the impact on data collection for critical website functions. The process is designed to be transparent for users and straightforward for merchants to implement and manage.
Method 1: Using Tag Assistant
If you go to https://tagassistant.google.com/, you can debug the consent states for any sites running Google Tags.
After adding the domain that you want to debug, you can choose a Tag ID from the top of Tag Assistant, then choose the first Consent event from the navigation on the left, and select the “Consent” tab to see default value of consent, all of consent types are denied:
Come back to your website and click to "Accept" button and you can see another consent event is fired. Click to Consent Tab and see the update event
If you see a warning that “a tag read consent before a default was set”, it means you have a race condition where your consent states are not established in time before any tags that reference them have time to fire.
Method 2: Using Console on DevTool
Open your site
Press button F12 or Ctrl + Shift + J
on Windows ( Cmd + Option + J
on MacOS) or Right Mouse and select Inspect to open Console Tab on
Type dataLayer
When cookie banner show, you can see the default consent event is fired
When you click to "Accept" button, you can see an Update event is fired