Skip to main content

Testing the correct application of consent-based logic using Google Tag Manager Preview mode

Adrian ESCRIVA avatar
Written by Adrian ESCRIVA
Updated this week

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

To do this, you’ll need to check your setup using GTM’s Preview mode. In this section, we’ll cover:

  • What GTM Preview mode is

  • A few practical examples

GTM Preview mode

Google Tag Manager’s Preview mode lets you check which tags are being fired, and exactly when they are fired.

Use it whenever you modify GTM tags to make sure everything behaves correctly before publishing your container.

Keep in mind: the Preview interface is available only in English.

To launch a preview:

  1. Click the Preview button in the top-right corner.

  2. In the window that appears, enter your website URL.

⚠️ GTM must already be implemented on your site for this to work.

After doing so, two windows will open:

  • Tag Assistant: this is where you’ll see all events, tags, and variables update as you interact with your site.

  • Your website: any action performed here will be reflected in the Tag Assistant window.

💡 Example of a Tag Assistant interface:

Capture_d_e_cran_2022-03-08_a__13.35.31.png

  • The summary panel: shows all tags, fired or not

  • An event: selecting an event lets you inspect whether a tag fired on the right event, or why it didn’t fire

Examples

Case #1: Facebook Pixel tag fired on an Axeptio event

In this example, we want to verify that our Facebook Pixel tag fires correctly on the corresponding Axeptio event: axeptio_activate_facebook_pixel.

By selecting the event in the event list, we can confirm that the tag did fire:

Capture_d_e_cran_2022-03-15_a__11.37.23.png

Clicking the “Facebook Pixel” tag shows the firing details, explaining why the tag fired or didn’t fire:

Capture_d_e_cran_2022-03-15_a__11.27.24.png

✅ The observed event matches the expected event: the tag is correctly fired.

If the user refuses cookies, Axeptio events will not be triggered — and therefore any tags depending on them will also not fire:

Capture_d_e_cran_2022-03-15_a__11.43.06.png

Case #2: Facebook Pixel tag fired on a custom event

In this scenario, we’ve added a condition to our “purchase” trigger.

It checks whether the Axeptio variable contains "facebook_pixel":

Capture_d_e_cran_2022-03-15_a__11.45.57.png

Let’s inspect the details:

Capture_d_e_cran_2022-03-08_a__13.54.57.png

✅ The tag fired on the "purchase" event.

✅ The variable displayed is its value, i.e. the list of all accepted services — not the variable name itself.

✅ The condition is met: the Axeptio variable does include "facebook_pixel".

✅ The observed event matches the expected triggering event.

Since both conditions are met, the tag fires successfully.

Now, if the user refuses cookies:

Capture_d_e_cran_2022-03-08_a__13.56.48.png

✅ One of the required conditions is not met, so the tag does not fire.

✅ The event is still correct, but the variable is empty — therefore it does not contain "facebook_pixel".

Did this answer your question?