GDPR Compliance Center tag template for the Google Tag Manager
Shopify stores using Google Tag Manager (GTM) can take advantage of the Google Consent Mode and make it play with the banner of the GDPR Compliance Center by following these step-by-step instructions. We assume that you have already created a GTM account, created a website container in GTM, and added the GTM container snippet to your store’s theme as required.
1. Loading the template in the GTM
First navigate to the “Templates” section of the Tag Manager container. Under the “Tag Templates”, click on the “Search Gallery” button.
Search for “GDPR Compliance Center by Pandectes” tag template, click on the result and then click on the button “Add to workspace”. The tag template will require the following permissions which are needed by the code inside the template to execute:
- Accesses consent state
- Accesses global variables
- Reads cookie value(s)
- Writes to data layer
Once you review the permissions, click on the “Add” button to load the template under your container’s templates.
2. Create the tag and configure the trigger.
Navigate to the “Tags” section of your Tag Manager container. Click on the “New” button to add a new tag. In the popup that opens, click anywhere on the “Tag Configuration” box where it says “Choose a tag type to begin setup”. Then search for or locate the “GDPR Compliance Center by Pandectes” tag and you will be presented with the following options:
Depending on your cookies policy, set the storage categories to the proper value. If you want all storage categories to start as blocked when the page loads, select “Denied” in the drop down menus.
To learn more about consent configuration for the Google Tag Manager read this article.
Go on and set the “Redact Ads Data” and “URL Passthrough” according to your needs.
Once the tag has been configured, you have to configure when it is triggered. Click on the “Triggering” box right below and select the “Consent Initialization – All Pages” trigger. Click on the “Add” button to enable the trigger.
Once the triggers are also setup click on the “Save” button to load the tag. On the popup that prompts you to rename the tag, click on the “Save” button.
The new tag should now display under your “Tags” list.
3. Submit the changes
Click on the “Submit” button to save the changes in your GTM container and the on the “Publish” button to activate the tag on the store.
You have now completed all the steps to load the GDPR Compliance Center by Pandectes tag on your container.