# Loading via Google Tag Manager

\
If you want to load the Sirdata CMP via Google Tag Manager (GTM), you must also enable Google Consent Mode via GTM to have more control over its behavior. To do this, go to your GTM account, navigate to the "Templates" section, and click on "Search Gallery" in the "Tag Templates" table.

<figure><img src="/files/Qjm3rbCekvi4UaWxsaLH" alt=""><figcaption><p>Tag templates</p></figcaption></figure>

Search for "Sirdata CMP | Google Consent Mode"

<figure><img src="/files/G6y3B1RkVNFldl6j2XxE" alt=""><figcaption><p>"Import a tag template"</p></figcaption></figure>

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

<figure><img src="/files/EwnFZcQACAS562n5bOu7" alt=""><figcaption><p>"Add the template"</p></figcaption></figure>

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

<figure><img src="/files/pnwRKpFXS9i0lw67iEUM" 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 in case of doubt**:

<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:

<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!**


---

# 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/install/via-a-tag-manager/loading-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.
