> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.pandectes.io/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).

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

The [Pandectes GDPR compliance](https://apps.shopify.com/gdpr-cookie-consent) app offers an official template in [Google Tag Manager](https://tagmanager.google.com/gallery/#/owners/pandectes/templates/gtm-templates-cmp-shopify) (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
${youtube}[Connect Pandectes with GTM (Official GTM template)](CTV_DVUNUQM)

**Prerequisites**

1. You need to have the cookie banner active.
2. You need to have connected your GTM to your store, through theme.liquid.
3. You need to have the in-app integration with Google Consent Mode V2 disabled.

### Step 1: Adding template from gallery

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

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-10-at-213307_1bcfitd.png =1000x344)

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

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-110345_1v0hb8f.png =1000x241)
 Then click on **Add to Workspace**.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-110551_i3nutl.png =1000x524)
Then confirm, by clicking **Add**.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-110903_o517wi.png =1000x748)
You have now successfully added the template! 

### Step 2: Creating tag from template

Go to the Tags, and create a new tag.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-111204_b7if1d.png =1000x377)
 Name it **Pandectes Consent**. Click on **Tag Configuration** and select the **Pandectes CMP (Consent Mode)**.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-111544_4num0k.png =1000x608)
Leave all the options as-is - Then click on **Triggering**.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-111936_1jy9ldh.png =1000x673)
On the trigger, select **Consent Initialization - All pages**.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-112150_18rpxou.png =1000x230)
Then the tag is ready! Now, we can assign consent categories to our other tags.

### Step 3: Assign consent categories to your tags

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

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-112904_bowdjv.png =1000x261)
Click on **Tag Configuration** then **Advanced Settings.**

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-113008_vlkqwh.png =1000x677)
Select **Consent Settings (BETA)** and Choose the **Require additional consent for tag to fire**. Then, click on **Add required consent**.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-113202_h0tasi.png =1000x723)
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.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-113432_18kzzfr.png =1000x674)
For your convenience, here is a table with the google consent mode Categories, corresponding to the Cookie banner Categories.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/pandectes-categories-to-google_1ucw7d.png =1000x497)
For example, if we want the tag to fire when the Performance cookies are allowed, we would choose analytics_storage: 

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-114627_1y8733f.png =1000x236)
Save the new tag settings, and that's all! The tag will only fire whenever consent is given to it.

### 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
![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-113956_1flg2xy.png =1000x255)
Make sure the **Enable consent overview** is selected: 

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-114119_lgrdln.png =1000x478)
Then, in your Tags, select the Shield Icon: 

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-114250_dbg4ja.png =1000x245)
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.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-114355_18e3lxk.png =1000x373)
Assign consent just like we did before.

![](https://storage.crisp.chat/users/helpdesk/website/1a5af239e847cf00/cleanshot-2025-03-11-at-114508_hcz4jp.png =1000x285)