> For the complete documentation index, see [llms.txt](https://docs.flowappz.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowappz.com/home/cookie-consent/getting-started/scripts/google-tag-manager-integration.md).

# Google Tag Manager Integration

* First, go to the **Scripts** menu.

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

* Then, select **Google Tag Manager** to open the Google Tag Manager tab and use Google Tag Manager.

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

* Then, enter your **Google Tag Manager ID** and click **Save Changes** to save the configuration.

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

* Then, go to your **Google Tag Manager** account and navigate to the **Templates** tab.

<figure><img src="/files/7Zwj0IRJy3V78cl81oVF" alt=""><figcaption></figcaption></figure>

* Then, click on **Search Gallery** under **Tag Templates**.

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

* Then, search for **FlowAppz** in the search bar and select **FlowAppz Cookie Consent GTM Template** from the results.

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

* Then, click **Add to Workspace**.

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

* Then, click **Add** to include it in your Google Tag Manager workspace.

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

* Now, you should see the **FlowAppz Cookie Consent GTM Template** in the tag templates list.

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

* Then, navigate to the **Tags** tab and click on **'New'**.

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

* Then, name the new tag **'Consent Mode Init'**.

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

* Then, click on the **Tag Configuration** section.

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

* Then, choose the **FlowAppz Cookie Consent GTM Template**.

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

* Then, click on the **Triggering** section.

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

* Then, select **'Consent Initialization - All Pages'**.

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

* Then, click **'Save'**

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

* Then, navigate to the **Triggers** tab and click **'New'**.

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

* Name the first trigger **"Essential Cookies".**

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

* Then, click on **Trigger Configuration**.

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

* Then, select **Custom Event**.

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

* Then, set the **Event Name** to **essential-activated**.

<figure><img src="/files/94N6DwFsnxBaVnxWNe84" alt=""><figcaption></figcaption></figure>

* Then, select **Some Custom Events**.

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

* Then, select **Event**, set the condition to **equals**, and enter **essential-activated**, as shown in the image.

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

* Then, click **Save** to save the trigger configuration.

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

* Then, you will see **Essential Cookies** added to the triggers list.

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

* Similarly, create a trigger for **Marketing Cookies** by clicking **New**.

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

* Then, name the trigger **Marketing Cookies** and click on **Trigger Configuration**.

<figure><img src="/files/0pciDe8mZlKCVxzdnXpr" alt=""><figcaption></figcaption></figure>

* Then, select **Custom Event**.

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

* Then, set the **Event Name** to **marketing-activated**, select **Some Custom Events**, configure the condition as **Event equals marketing-activated**, and click **Save** to save the configuration.

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

* Then, name the new trigger **Personalization Cookies** and click on **Trigger Configuration**.

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

* Then, select **Custom Event**.

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

* Then, set the **Event Name** to **personalization-activated**, select **Some Custom Events**, configure the condition as **Event equals personalization-activated**, and click **Save** to save the configuration.

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

* Then, create a new trigger named **Analytics Cookies** and click on **Trigger Configuration**.

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

* Then, select **Custom Event**.

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

* Then, set the **Event Name** to **analytics-activated**, select **Some Custom Events**, configure the condition as **Event equals analytics-activated**, and click **Save** to save the configuration.

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

* Then, you will see four triggers—**Analytics Cookies**, **Essential Cookies**, **Marketing Cookies**, and **Personalization Cookies**—added to the triggers list.

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

* Now, for example, we will add **Analytics** **trigger** to **Google Analytics** for triggering the script. First, navigate to the **Tags** tab and click on your **Google Analytics** tag.

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

* Then, remove **All Pages** from the triggering.

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

* Then, click on **Triggering** again.

<figure><img src="/files/2kXCmv7dsDzhVnCRgIAq" alt=""><figcaption></figcaption></figure>

* Then, select **Analytics Cookies**.

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

* Then, click **Save** to save the configuration. Now, the **Google Analytics** script will be triggered only if users give permission for **Analytics** consent.

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