> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/optimize-your-setup/consent-management/add-consent-studio-to-gtm.md).

# Add Consent Studio to GTM

This guide explains step by step how to integrate the Consent Studio template into your Google Tag Manager web container, so your website complies with privacy regulations and visitors give proper consent for cookie use.

{% stepper %}
{% step %}
**Add the Consent Studio tag template**

Open your GTM web container, go to **Templates**, and click **Search Gallery** under Tag Templates. Search for **Consent Studio CMP** and add it to your workspace.
{% endstep %}

{% step %}
**Create the Consent Studio CMP tag**

Go to **Tags** and create a new tag. As the tag configuration, choose **Consent Studio CMP**.
{% endstep %}

{% step %}
**Confirm your domain is registered**

Unlike some other CMPs, Consent Studio doesn't need a manual ID pasted into the tag — it matches based on the domain you registered in your Consent Studio dashboard. Just make sure the site you're tagging is added there first.
{% endstep %}

{% step %}
**Set the trigger and save**

As the trigger, choose **Consent Initialization – All Pages**. This is required for Consent Studio to support Google Consent Mode v2 correctly. Save the tag.
{% endstep %}

{% step %}
**Choose Basic or Advanced consent mode**

* **Advanced** — the simpler option. Let tags load on their normal trigger (e.g. All Pages), and Consent Studio adjusts their behavior automatically based on the visitor's consent state. This works well for official Google tags, which respect consent signals natively.
* **Basic** — tags are only allowed to load once consent for a specific category has been given. To set this up, create a **Custom Event** trigger using one of Consent Studio's built-in dataLayer events — `cookie_consent_granted_functional`, `cookie_consent_granted_analytics`, or `cookie_consent_granted_marketing` — and attach it to any tag that shouldn't fire until that category is accepted.

If you're not sure whether a particular tag respects consent signals on its own, Basic mode is the safer default for it.
{% endstep %}

{% step %}
**Enable or disable Google Consent Mode (optional)**

Google Consent Mode is on by default. If you need to turn it off, open the Consent Studio CMP tag's **General Settings** and set the Google Consent Mode toggle to **No**.
{% endstep %}
{% endstepper %}

Next, make sure your consent overview settings are configured correctly within Google Tag Manager. Follow [the 'Consent Management' article](/optimize-your-setup/consent-management.md) for these settings.

Since you don't want to measure events before the visitor has given consent, you'll also need to adjust the triggers of specific tags, such as the page\_view event tags, see [the 'Trigger sequence for consent processing' article](/optimize-your-setup/consent-management/trigger-sequence-for-consent-processing.md) to learn how to set this up.


---

# 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://docs.adpage.io/optimize-your-setup/consent-management/add-consent-studio-to-gtm.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.
