Skip to main content

Test the correct application of the packaging logic using the Google Tag Manager preview

Written by Alexandre Dias Da Silva

You now want to verify that your Google Tag Manager integration is valid.

To do this, you need to verify your settings using GTM's Preview mode.

We will cover the following in this section:

GTM preview mode

Google Tag Manager's preview mode allows you to check which tags are fired and when they are fired.

Do not hesitate to use it after modifying your GTM tags to ensure everything works correctly before publishing and putting your GTM live. Note that the preview is exclusively in English.

To launch a preview:

  • Click the Preview button in the top right corner

  • In the window that appears, enter the URL of your site.

⚠ GTM must be integrated into your site for this to work

Following these actions, two windows open:

  • The first is the Tag Assistant: this is where we will see all events, tags, and other variables evolve as you perform actions on the second window
    ​
    ​

  • The second window represents your site: the actions you perform on it will be observable in the Tag Assistant.

💡 Example of a Tag Assistant window:

Capture_d_e_cran_2022-03-08_a__13.35.31.png
  • The summary: it shows you all the tags that were fired or not

  • An event: by selecting it in the list it allows you to see if a tag was fired on the correct event or, on the contrary, why it was not fired

A few examples

Case No. 1: Facebook Pixel tag fired on the Axeptio event

In this case, we want to verify that our Facebook tag is fired on the corresponding Axeptio event: axeptio_activate_facebook_pixel.

By selecting the event in the list of events, we can see that the tag was properly fired:

Capture_d_e_cran_2022-03-15_a__11.37.23.png


By clicking on our "Facebook Pixel" tag, we have the details of its firing, and we can verify why it was fired or not:

Capture_d_e_cran_2022-03-15_a__11.27.24.png

✅ The observed event is equal to the event required for firing: the tag is therefore fired.

If, as a user, I refused cookies, the Axeptio events do not send, and therefore the tags attached to them are not fired:

Capture_d_e_cran_2022-03-15_a__11.43.06.png

Case No. 2: Facebook Pixel tag fired by a custom event

In this case, we added a condition to our "purchase" trigger, which verifies that the Axeptio variable contains "facebook_pixel":

Capture_d_e_cran_2022-03-15_a__11.45.57.png

Let's now look at the details:

Capture_d_e_cran_2022-03-08_a__13.54.57.png

✅ Our tag was properly fired on the "purchase" event

✅ It is not the variable name that appears, but its value, so a list of all accepted cookies

✅ Our condition on the Axeptio variable is met: it contains "facebook_pixel"

✅ The observed event is equal to the expected event for firing. Since both conditions are met, the tag was properly fired.

Now, if as a user I refuse cookies:

Capture_d_e_cran_2022-03-08_a__13.56.48.png

✅ Since one of the conditions was not met, our tag was not fired.

✅ The observed event is still correct. On the other hand, since my variable is empty, it does not contain "facebook_pixel".

Did this answer your question?