Articles on: Integrations
This article is also available in:

Integration with Google Tag Manager (GTM) - Official Pandectes Template

Overview


The Pandectes GDPR compliance app offers an official template in Google Tag Manager (GTM) to integrate the cookie consent banner with it. This allows you to handle Google Consent Mode V2 inside the Google Tag Manager and manage your tags to run according to user consent.


When you publish our GTM Template then make sure Pandectes banner is active in order the appropriate signals to fire inside GTM. If you only publish the Pandectes GTM template and you have the Pandectes banner inactive, then all Tags will be blocked inside GTM by the default event, which by default sends a deny.


Video Guide


Prerequisites


  1. The cookie banner is active.
  2. You are on the Plus plan or higher. On the Basic plan the template does not receive consent updates.
  3. Your GTM container loads in one of these two ways:
    • From Pandectes (recommended): the Google Consent Mode integration is on, your container ID is in Google Tag Manager ID, and I have added Pandectes CMP tag to the GTM container. is selected. See Step 4 below.
    • From your theme: the GTM snippet is in theme.liquid and the Google Consent Mode integration in Pandectes is turned off.


Not sure which one fits your store? See How to set up Google Tag Manager with Pandectes.



Go to GTM's templates, then click on Search Gallery.


Screenshot


Search for Pandectes, and select the Pandectes CMP (Consent Mode).


Screenshot

Then click on Add to Workspace.


Screenshot

Then confirm, by clicking Add.


Screenshot

You have now successfully added the template!


Step 2: Creating tag from template


Go to the Tags, and create a new tag.


Screenshot

Name it Pandectes Consent. Click on Tag Configuration and select the Pandectes CMP (Consent Mode).


Screenshot

Leave all the options as-is - Then click on Triggering.


Screenshot

On the trigger, select Consent Initialization - All pages.


Screenshot

Then the tag is ready! Now, we can assign consent categories to our other tags.



Open the tag that you would like to assign consent to.


Screenshot

Click on Tag Configuration then Advanced Settings.


Screenshot

Select Consent Settings (BETA) and Choose the Require additional consent for tag to fire. Then, click on Add required consent.


Screenshot

From the dropdown, select the consent mode category that you want to assign to the tag, so that it fires when that category is accepted.


Screenshot

For your convenience, here is a table with the google consent mode Categories, corresponding to the Cookie banner Categories.


Screenshot

For example, if we want the tag to fire when the Performance cookies are allowed, we would choose analytics_storage:


Screenshot

Save the new tag settings, and that's all! The tag will only fire whenever consent is given to it.


Step 4: Finish the setup in Pandectes


Skip this step if your GTM container loads from theme.liquid.


  1. In Shopify Admin, go to Apps > Pandectes GDPR > Integrations. On the Google Consent Mode card, click Configure.


Configure button on the Google Consent Mode card


  1. Turn on the Google Consent Mode toggle.


Google Consent Mode toggle


  1. Enter your container ID in Google Tag Manager ID, select I have added Pandectes CMP tag to the GTM container., and click Save. Pandectes then loads your container and the Pandectes CMP tag handles consent for every tag in it. Remove the GTM snippet from theme.liquid so the container does not load twice.


Google Tag Manager ID field and Pandectes CMP tag checkbox


OPTIONAL Pro tip - if you have many tags


This is a method to add a consent category to multiple tags - to save time.


Go to the Admin panel, and choose Container Settings

Screenshot

Make sure the Enable consent overview is selected:


Screenshot

Then, in your Tags, select the Shield Icon:


Screenshot

This will open the Consent Overview Panel. Choose the tags that you want to assign a consent category to, and click on the Shield Icon.


Screenshot

Assign consent just like we did before.


Screenshot

Updated on: 27/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!