> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.consentmo.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Google Consent Mode V2 Integration (Advanced mode)

You can easily integrate Google Consent Mode V2 with the Consentmo GDPR app. This feature is available for all users, including those on the Free plan. 

# Manual Integration

The process for initial manual integration for Google Consent Mode V2 is the following:
 

1. Open **Shopify Admin**.

2. Click on **Online Store** link in the left menubar.

3. Click on the **Actions** dropdown button and select **Edit Code** from there.

4. A new page will open with a list of files on the left side of the screen.

5. Create a new liquid file in the **Snippets** section of the theme files, called `gcm-integration-script.liquid`

6. After that copy the content of the integration script provided below and paste it in the newly created Snippet file:

| [Download](https://gdprstorage.b-cdn.net/faq/files/consentmo-gcmv2-advance-mode-integration-2025-06-05.zip) Google Consent Mode V2 Integration script

7. Open the `theme.liquid` file.

8. Locate the opening `<head>` tag and right after it, add the following line of code:

```
<!-- Google Consent Mode V2 Consentmo -->
{% render 'gcm-integration-script' %}
```

||| **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.).

### A reference on the process can also be checked here:

${youtube}[Google Consent Mode V2 Integration by Consentmo GDPR app](omXl10c6p-o)

9. **The final result should look like this:**

[![](https://gdprstorage.b-cdn.net/faq/gif/result-for-new-users-in-theme-liquid.gif)](https://gdprstorage.b-cdn.net/faq/gif/result-for-new-users-in-theme-liquid.gif)

||| NOTE: ${color}[#2185e4](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](/en/article/uninstalling-the-consentmo-app-1t7juar/) of our FAQ page.

Once this is done, the integration of the **Google Consent Mode** with our app will be successfully set in your store. 

| For further information on how our app works with **Google Consent Mode**, continue reading the text below:

# Automatic Integration

In case you want to make this integration __automatically__ and load all your Google tags from our app settings, so they can integrate with the Google Consent Mode V2, please refer to this [guide](https://support.consentmo.com/en/article/google-consent-moce-v2-gcm-v2-automatic-integration-4tnbts/).

# Google Consent mode has two variants.

1. **Before consent:**
* These are the **default** settings that the page will use while waiting for the user’s consent status to be given.
    When your customers visit your store, the integration we provided will initially run the **default** settings and populate the parameters in the `dataLayer` to `granted` or `denied` depending on how the option **Initial State Of The Cookie Bar** is set.  

2. **After consent:**
* Then, there are the **update** settings that are sent as soon as consent has been given.
    After that, when your store visitor gives his consent by accepting the Cookie bar, the **updated** settings will set the parameters to `granted` or `denied` depending on which cookie categories the visitor chooses to block. If no cookie categories are blocked, the Google services will set their cookies to the visitor's browser.

||| As a general recommendation, it would be best to check and address the steps for overall store compliance, listed in the below article as well:
||| [Setting your store's compliance](/en/article/setting-your-stores-compliance-1tqs8pn/)

# Testing the Integration

In order to test the integration once you complete the above steps, please refer to this [guide](/en/article/testing-the-integration-with-google-consent-mode-v2-10bgr9/)

# Need help?

In case you need any assistance, please make sure to reach out to our support team via live chat or at support@consentmo.com