# Install AppConsent with Google Tag Manager

On this page you will find the method to implement AppConsent CMP with the solution of tag management system "Google Tag Manager"

***

{% hint style="danger" %}
**ATTENTION**

Before proceeding, we assume that you have an installation of GTM on your website.

If you note familiar with Google Tag Manager, please find the official documentation of Google [here](https://support.google.com/tagmanager/answer/6102821?hl=en\&authuser=1)**.**

You can have one CMP implementation per site. If you wish to use Google Tag Manager rather than code-based implementation, make sure you don't have another AppConsent implementation on your site.
{% endhint %}

## Import tag template AppConsent

To import the tag template AppConsent in your Google Tag Manager account :

1. Go to your container
2. Then, in the left-hand side panel, click on **Templates**
3. Then, click on **Search Gallery**

<figure><img src="https://4229351976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkyFlZKFaKP4MUM0zILOg%2Fuploads%2FDcyv8OgnAUN4B5Nacgx5%2FGTM-new-template.png?alt=media&#x26;token=4e8bb54f-e850-4ff4-bf2e-47363a4dc688" alt=""><figcaption></figcaption></figure>

4. Then, in the search bar in right-hand side panel, search **Sfbx AppConsent CMP Setup**
5. Find the template named **Sfbx AppConsent CMP Setup**
6. Add it in your container

<figure><img src="https://4229351976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkyFlZKFaKP4MUM0zILOg%2Fuploads%2FmbkbFiQGxUiTa8SYzxqY%2FGTM-choose-template.png?alt=media&#x26;token=19dc572c-7cf8-4d0f-b453-c75ee2c9205b" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**ATTENTION**

The tag template named **Sfbx - AppConsent CMP - Default Consent Mode** is now deprecated. You no longer need to import it into your container.
{% endhint %}

## Creation and configuration of the tag

To create the tag, you need :

1. Click on **Tags** menu in the left-hand panel
2. Then, click on the New button

<figure><img src="https://4229351976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkyFlZKFaKP4MUM0zILOg%2Fuploads%2FUIEMTd7BhESm90chl8tj%2FGTM-new-tag.png?alt=media&#x26;token=6d844dba-d1ed-4748-a90a-f087642d20dd" alt=""><figcaption></figcaption></figure>

On the configuration display that appears :

1. Name the tag in top left text field
2. Then click on **Tag configuration** section
3. In right-hand side panel, select the tag template **Sfbx AppConsent CMP Setup** in **Custom** section

<figure><img src="https://4229351976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkyFlZKFaKP4MUM0zILOg%2Fuploads%2FR6heOpUmwJSHPVotWh6z%2FGTM-tag-select-template.png?alt=media&#x26;token=3f3e1b9c-eee0-42ea-bb30-3fdc94ea4196" alt=""><figcaption></figcaption></figure>

Once you have selected the template, add the appkey of the notice and configure the tag to suit your needs.

<figure><img src="https://4229351976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkyFlZKFaKP4MUM0zILOg%2Fuploads%2Feld1pBCuFvthJTMmuXDT%2FGTM-tag-add-appkey.png?alt=media&#x26;token=c4e0b301-cd47-4f2b-a062-efc388589a76" alt=""><figcaption></figcaption></figure>

Finally, you need to tell GTM when to trigger the tag. To do this :

1. Click on **Triggering** section

<figure><img src="https://4229351976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkyFlZKFaKP4MUM0zILOg%2Fuploads%2FYNk2LTZp2PmF48Y0lnG5%2FGTM-tag-triggering.png?alt=media&#x26;token=cc186596-5662-4a38-8054-3b0ef186e277" alt=""><figcaption></figcaption></figure>

2. Then select the **Consent Initialization - All pages** trigger in the right-hand side panel

<figure><img src="https://4229351976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkyFlZKFaKP4MUM0zILOg%2Fuploads%2FEeC31M8TvMDohxKNnNIp%2FGTM-tag-add-trigger.png?alt=media&#x26;token=1b68d105-6c7a-4c9d-a224-999cfc57cfe7" alt=""><figcaption></figcaption></figure>

3. Once the trigger has been added, click **Save to save the tag**
