> For the complete documentation index, see [llms.txt](https://cmp.docs.sirdata.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cmp.docs.sirdata.net/en/consent-transmission-standards/google-consent-mode/activation-via-google-tag-manager.md).

# 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="/files/vyfMWLzcIzNh6xt0M6DT" %}

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="/files/uRlIWZ99ImqAIkpBGdFj" alt=""><figcaption></figcaption></figure>

Then click on the three dots in the top right corner (![](/files/qWeP4XWP64vJSWMf2Hyx)) and then on "*Import*".

<figure><img src="/files/3sFWue3ZKPhBdlynI4cd" alt=""><figcaption></figcaption></figure>

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

Then click on ![](/files/3ax0Q91wCM59F2ulwwoE)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="/files/yw59QEMypvqaALi1VMp0" alt=""><figcaption></figcaption></figure>

In the configuration part, click on ![](/files/xyJ5sBkHyhQB3uW4azlk)to add a configuration:

<figure><img src="/files/O0hgKCsXbvWreVT8BI3W" alt=""><figcaption></figcaption></figure>

Select your criteria or keep the default suggestion:

<figure><img src="/files/MhXrsPKDqLT2TXPjaZYi" 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="/files/EdWmVUFTMsekfwjskScq" 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 ![](/files/8cznP3s6XVN693cnWBF3).

<figure><img src="/files/JAEfWjFN28ToMD4c3Lu3" 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cmp.docs.sirdata.net/en/consent-transmission-standards/google-consent-mode/activation-via-google-tag-manager.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
