How to use a GTM preview mode?

How to use a GTM preview mode?

Nelson
Written by NelsonLast update 9 months ago

The easiest way to implement Google Consent Mode on your website is by using a CookieScript Google Tag Manager (GTM) Tag template.

First, create your GTM account and a website container in GTM, and install the GTM container to your website, where you could add your tags. Read the guide on how to create a GTM account and install the GTM container.

Second, install CookieScript. You can install the CookieScript using GTM Tag Template or as a Custom HTML Tag. Read the guide on how to install CookieScript with GTM.

Third, implement Google Consent Mode with a CookieScript GTM Tag template by including APIs to control tag cookie storage based on user consent choices without disabling Google services. Read the guide on how to implement Google Consent Mode.

Google Consent Mode is an optional feature and should be enabled in CookieScript settings too. Go to your CookieScript acoount > Banner settings > Behaviour tab > Enable Google Consent Mode.

Fourth, test if the GTM works properly, meaning that you get the right information from your cookie banner regarding the user choice of cookies. For testing your GTM, you should use a GTM preview mode.

To access the GTM preview mode, follow the steps below.

Step 1: Connect to your GTM account.

Step 2: Press the Live version tab.

A new window opens, presenting a summary of a live version.

Step 3: Click the Menu button, found at the top-right corner of the window and marked as three dots, and then click Preview.

A new GTM preview mode window will open.

Step 4: On the GTM preview mode window, check for ad blocker extensions or other ad blockers. They should be turned off.

Step 5: Enter your website’s URL and press Connect.

A new window will open, showing your website with the CookieScript banner.

Now you have two windows for testing of GTM: the GTM preview mode window, where you entered your URL, and the new one, showing your website with the CookieScript banner.

Step 6: On the left side of the panel of the GTM preview mode window, press Consent, and you will get the values of your cookie banner’s consent mode.

Step 7: Test if Google Consent Mode works well, and if you get the right information from users regarding their cookie choice.

For example, if you select Accept all cookies on the banner of your website’s window, the output of the GTM on the GTM preview mode window should be granted for all categories of cookies.

If you select Accept analytics cookies on the banner of your website’s window, the output of the GTM on the GTM preview mode window should be granted just for analytics cookies and denied for all other types of cookies.

The selected choices of cookies should correspond on both windows: on the GTM preview mode window, and on the window, showing your website. If the values of accepted and rejected cookies correspond in all cases, it means that Google Consent Mode works properly, the CookieScript GTM Tag template communicates well with the cookie banner of your website.

You can also read the article on how to check if Google Consent Mode is activated.

Did this answer your question?