# Via Google Tag Manager

If you wish to activate Google's Advanced 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, this is entirely possible.

Go to your[ GTM account](https://tagmanager.google.com/), navigate to the "Templates" section, and click on "Search Gallery" in the "Tag Templates" table.

<figure><img src="/files/9PGHRmncUx5Y8eNTqqB8" alt=""><figcaption></figcaption></figure>

Search for "Sirdata CMP | Google Consent Mode"

<figure><img src="/files/8kPCFpP7fck5zMVVtiSE" alt=""><figcaption></figcaption></figure>

Add the "Sirdata CMP | Google Consent Mode" template to the workspace.

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

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

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

In the configuration section, click on ![](https://cmp.docs.sirdata.net/~gitbook/image?url=https%3A%2F%2F2240931758-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MUspPnkTFMlMDdGxvAb-2584506019%252Fuploads%252FQdtOYBgkhkSpsbMk05Ni%252Fimage.png%3Falt%3Dmedia%26token%3Dca1ca138-fc0a-4b31-926d-de8b526d5b58\&width=300\&dpr=4\&quality=100\&sign=1e0b79b7\&sv=1) to add a configuration:

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

Select your criteria or keep the default suggestion (Refer to the official [Google Consent Mode page](https://support.google.com/analytics/answer/9976101?hl=en) for more information on these criteria if needed) :

<figure><img src="/files/8Nk7YC233iMOtrZjfazU" alt=""><figcaption></figcaption></figure>

Repeat the operation if necessary, for example, if you are making configurations differentiated by country. Click here for more information on these criteria.

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

<figure><img src="/files/LoYjSIaqb1r7SF0IwuE8" 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 the Tag Manager.
{% endhint %}

Finally, select the trigger *"Consent Initialization - All Pages"* and ![](https://cmp.docs.sirdata.net/~gitbook/image?url=https%3A%2F%2F2240931758-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MUspPnkTFMlMDdGxvAb-2584506019%252Fuploads%252FuHUGijsyoVnfdyHKHtgk%252Fimage.png%3Falt%3Dmedia%26token%3D5e304641-9beb-4e08-ae13-cef0f3b89636\&width=300\&dpr=4\&quality=100\&sign=585b2bd6\&sv=1)<br>

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

Test using the preview mode, and publish if everything works as expected.

Congratulations!

{% hint style="danger" %}
**ATTENTION :** Google Consent Mode does not fully cover certain aspects related to the GDPR, such as the legal basis for data processing or potential transfers to the United States when relying on the European Union's Standard Contractual Clauses, for example.

Please refer to the section dedicated to Sirdata Analytics Helper if your goal is to secure data transfers to Google Analytics.
{% endhint %}


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
