# Activation via Google Tag Manager

If you wish to activate Google Consent Mode via Google Tag Manager (GTM), to have more control over its behavior or to load the Sirdata CMP scripts from GTM for example, that's entirely possible. Start by downloading this tag template "*Sirdata\_Google Consent Mode.tpl*" :

{% file src="<https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FXucTVpOp5Uz84mQ4xxtF%2FSirdata_Google%20Consent%20Mode.tpl?alt=media&token=a9607321-ff67-4c75-9652-5b1480d18a98>" %}

Then go to your [GTM account](https://tagmanager.google.com/), in the "*Templates*" section, and click on "*New*" in the "*Tag Templates*" table.

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FcmLqIaUMNG1fAf1WffAJ%2Fimage.png?alt=media&#x26;token=34a741f6-713a-430f-b96f-b94c83c26570" alt=""><figcaption></figcaption></figure>

Then click on the three dots in the top right corner (![](https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FoZ2J6HG7EhSLlzzJ3Yyx%2Fimage.png?alt=media\&token=a7f9c9a5-275a-406f-9a96-d2036ffe1699)) and then on "*Import*".

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2F4oO6HhWjpp6gDbkz7Emz%2Fimage.png?alt=media&#x26;token=ac693048-c253-42d1-ae17-257fcb75cba3" alt=""><figcaption></figcaption></figure>

Select the file "*Sirdata\_Google Consent Mode.tpl*" that you previously downloaded and upload it.&#x20;

Then click on ![](https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FAME5mby47DAXisSDftj3%2Fimage.png?alt=media\&token=460fe24c-0b41-420b-8407-c21938434d85)at the top right without changing anything, and then exit the editor using the close cross in the top left.

Go to the "*Tags*" section, and create a new one by selecting the new tag type "*Sirdata | Google Consent Mode*" which now appears in the custom tags:

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2F8fRld8gyd0gA2FHIi4ng%2Fimage.png?alt=media&#x26;token=274199d7-cc3c-44e5-a3ed-3a75b206a0e5" alt=""><figcaption></figcaption></figure>

In the configuration part, click on ![](https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FCNL9AyTJKuTLeCPU1sRt%2Fimage.png?alt=media\&token=1e6f81e5-6b9b-4d46-b092-8e03e9c0f68f)to add a configuration:

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FvNNTYcDUVZx1DfBC7kFt%2Fimage.png?alt=media&#x26;token=7099de29-8c7b-43ce-a7f0-0135a563f36e" alt=""><figcaption></figcaption></figure>

Select your criteria or keep the default suggestion:

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FBrO7VwTEL5tXt490U34Y%2Fimage.png?alt=media&#x26;token=a5f5b80a-a6c9-4874-aea4-f82cde8a37f6" alt=""><figcaption></figcaption></figure>

Repeat the operation if necessary, for example if you are making configurations differentiated by country. Click [here](https://developers.google.com/tag-platform/devguides/privacy?hl=en) for more information on these criteria.

Then configure your advanced options and enter your partner and configuration identifiers if you wish to load the CMP from GTM:

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FCoivJjYjSUydyFObHCRH%2Fimage.png?alt=media&#x26;token=2a6e2481-5e40-48c8-91f0-98b11afe7b68" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you do not load the Sirdata CMP from GTM, it is **mandatory** to load it from the site, and the CMP scripts must be loaded **before** Google Tag Manager.
{% endhint %}

Finally, select the trigger "*Consent Initialization - All Pages*" and ![](https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FWfvUCCWIKx4cx1kofJMf%2Fimage.png?alt=media\&token=eafdf4c4-4201-4f25-8c9d-30cb02eb772f).

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FTmr5KeQyYDd5xY3ZDUaZ%2Fimage.png?alt=media&#x26;token=8090a360-4eda-4a91-b0c6-4adfbeb5b8cf" alt=""><figcaption></figcaption></figure>

Test via preview, and publish if everything works as expected.

**Congratulations!**

{% hint style="info" %}
Please visit the official [Google Consent Mode](https://support.google.com/analytics/answer/9976101?hl=en) page for more information
{% endhint %}

{% hint style="danger" %}
**WARNING**: Google Consent Mode does not cover given aspects related to the GDPR, such as the legal basis for processing personal data or potential data transfer to the United-States when they are based on the Standard Contractual Clauses of the European Union for example.

Please refer to the section dedicated to [Sirdata Analytics Helper](https://helper.docs.sirdata.net/v/english/) if your desire is to secure data transfers to Google Analytics in the United-States.
{% endhint %}
