Articles on: Integrations

Elevar integration for Consentmo GDPR app

This article is tailored to address Shopify merchants who use the Consentmo GDPR app for their cookie banner and are interested in using Elevar Tagging and Tracking Management.

Consentmo’s functionality ensures that all the tags of your Google Tag Manager are set up to activate only after your store visitors give their consent. This is possible thanks to the implementation of Google Consent Mode.

Here's how to set up Google Consent Mode in Consentmo GDPR :

Integrate Google Consent Mode with Consentmo GDPR

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. Locate the Assets folder and click on it in order to expand it. After that, click on Add a new asset and upload the file consentmoGDPR-gcm-blocking-script.js provided under this step.

Download - consentmoGDPR-gcm-blocking-script.js

(Optional step) In the file you just uploaded, there is a property called initialState. This property is responsible for setting the categories in Google Consent Mode's default consent to either granted or denied.

By default, the initialState property is set to 7, which means that the categories in the default consent will be set to denied and Google Consent Mode will initially block all tracking services before the customer gives his consent.

Under the initialState property, you will find a comment with the acceptable values that can be applied to the initialState property, as well as information about which categories will be set to granted or denied depending on the value chosen.

After applying the file to the Assets folder, open the theme.liquid file and find the opening tag of the head HTML element - <head>.

Copy the line of code provided below and paste it as close to the opening head tag ( <head> ) as possible.
Note: The line of code should be placed close to the opening head tag as the Google Consent Mode needs to be executed before the other tracking services ( Google Tag Manager, Google Ads, etc.).

<script async src="{{ 'consentmoGDPR-gcm-blocking-script.js' | asset_url }}"></script>

The final result should look like this:

After completing the setup, when a new visitor enters your store, Consentmo will trigger the initiation of the proper permissions for your GTM container to stay in compliance. When the visitor eventually interacts with the cookie banner, it will make sure to update Google Consent Mode and apply the new permissions for the tags to fire.

In case you need any assistance with the above setup, feel free to reach out to our support team oner chat or via e-mail at

Updated on: 21/08/2023

Was this article helpful?

Share your feedback


Thank you!