Basic mode - Google Consent Mode V2
The Google Consent Mode v2- Basic Mode integration for our app consist of two steps.
Open Shopify Admin.
Click on Online Store link in the left menubar.
Click on the Actions dropdown button and select Edit Code from there.
A new page will open with a list of files on the left side of the screen.
Create a new liquid file in the Snippets section of the theme files, called consentmo-gcmv2-basic-mode-integration
After that copy the content of the integration script provided below and paste it in the newly created Snippet file:
Download Google Consent Mode V2 - Basic Mode Integration script
Open the theme.liquid file.
Locate the opening <head> tag and right after it, add the following line of code:
Note: The line of code should be placed right after the opening <head> tag as the Google Consent Mode needs to be executed before the other tracking services (Google Tag Manager, Google Ads, etc.).
In case you need help with the process, please refer to the following via guide as well:
NOTE: Make sure to remove the added code before deleting the app. This way, no snippets of code will be left in your theme. For more information on what you should be aware of when deleting our app check this article of our FAQ page.
This step consist of create a Trigger and setting up the consent setting for each tag. First, start by creating the Trigger:
Click on the Triggers button on the left menu
Click on the New button > Trigger Configuration > Custom Event
In the field Event name write our app's event - consent_status
Make sure that All Custom Events is picked and click on the Save button to save the changes.
A reference on the process can be checked in the following video:
After creating the trigger you should setup the consent settings for each of your tags. In order to do that click on the Tags button located on the left menu and follow these instructions for all of the tags that require consent:
Open the tag's settings.
Scroll down to the the Additional Consent Checks option, pick Require additional consent for tag to fire and in the field below it setup the required consent. (e.g. for Google Analytics tag - analytics_storage, for Google Ads tag - ad_storage, etc.).
After setting up the required consent, scroll down to the Triggering section, click on the plus icon and choose the trigger we created (in our case the name of the trigger is Consentmo trigger.
Click on the Save button to save the changes.
A reference on the process can be checked in the following video:
NOTE: If your store has any Google services that are setup without Google Tag Manager, you should setup their IDs in the variable googleServicesIDs separated with a comma as shown in this example.
About consent mode
In need of any assistance with the setup, do not hesitate to drop us a line at support@consentmo.com or via our Live chat.
The process for initial manual integration for the Basic Mode of the Google Consent Mode V2, is the following:
Adding the integration script in your theme
Open Shopify Admin.
Click on Online Store link in the left menubar.
Click on the Actions dropdown button and select Edit Code from there.
A new page will open with a list of files on the left side of the screen.
Create a new liquid file in the Snippets section of the theme files, called consentmo-gcmv2-basic-mode-integration
After that copy the content of the integration script provided below and paste it in the newly created Snippet file:
Download Google Consent Mode V2 - Basic Mode Integration script
Open the theme.liquid file.
Locate the opening <head> tag and right after it, add the following line of code:
<!-- Google Consent Mode V2 Consentmo -->
{% render 'consentmo-gcmv2-basic-mode-integration' %}
Note: The line of code should be placed right after the opening <head> tag as the Google Consent Mode needs to be executed before the other tracking services (Google Tag Manager, Google Ads, etc.).
In case you need help with the process, please refer to the following via guide as well:
NOTE: Make sure to remove the added code before deleting the app. This way, no snippets of code will be left in your theme. For more information on what you should be aware of when deleting our app check this article of our FAQ page.
The second step is for setting up the Google Tag Manager's tags.
This step consist of create a Trigger and setting up the consent setting for each tag. First, start by creating the Trigger:
Click on the Triggers button on the left menu
Click on the New button > Trigger Configuration > Custom Event
In the field Event name write our app's event - consent_status
Make sure that All Custom Events is picked and click on the Save button to save the changes.
A reference on the process can be checked in the following video:
After creating the trigger you should setup the consent settings for each of your tags. In order to do that click on the Tags button located on the left menu and follow these instructions for all of the tags that require consent:
Open the tag's settings.
Scroll down to the the Additional Consent Checks option, pick Require additional consent for tag to fire and in the field below it setup the required consent. (e.g. for Google Analytics tag - analytics_storage, for Google Ads tag - ad_storage, etc.).
After setting up the required consent, scroll down to the Triggering section, click on the plus icon and choose the trigger we created (in our case the name of the trigger is Consentmo trigger.
Click on the Save button to save the changes.
A reference on the process can be checked in the following video:
NOTE: If your store has any Google services that are setup without Google Tag Manager, you should setup their IDs in the variable googleServicesIDs separated with a comma as shown in this example.
More information on the Basic Mode of the Google Consent Mode V2 can be found here:
About consent mode
In need of any assistance with the setup, do not hesitate to drop us a line at support@consentmo.com or via our Live chat.
Updated on: 25/10/2024
Thank you!