Skip to content

Direct to sGTM, Testing

(Data Flow version without using GTM Web Container) (Part 3 of 3)

GTM Preview Mode

In this step you are using the Preview option from Google Tag Manager to check the value of the cookie received from the Usercentrics sGTM server.

We will first check the tags triggered and the cookie value with the visitor consenting to send data to Google Analytics and then with the visitor not consenting to send data.

Go to Google Tag Manager.

Return to your "Server Container" Step 3 screenshot

We are now going to be testing our "Server Container" Click on the "Preview" button. Step 4 screenshot

The "Preview" mode

Clicking on the Preview button will open a new page, the "Preview" mode of your Server Container

Keep both this Preview Mode and the regular GTM pages open

Step 5 screenshot

Notice:

  • On the left of the page, look at the area under "Summary 🗑"
  • Note that the space is empty.
  • We will soon see activity there, proving that data is arriving at the Preview of your SST Server.

In another tab, go to your site and click randomly and scroll Step 6 screenshot

Activity

Get Back to Google Tag Manager "Summary 🗑" page, you will see some activity, select page view Step 7 screenshot

Click on Request Step 8 screenshot

Click "Incoming HTTP Request" Step 9 screenshot

Under "Cookie" - locate "ucConsentAllowedDps" In this ucConsentAllowedDps cookie, we can see which consent values this visitor (you right now) agreed to in the Usercentrics CMP. We will use this to help the SST Server determine which data is allowed to be collected.

Step 10 screenshot

Click on Tags Step 11 screenshot

Successfully fired Tag, based on Trigger

Google Analytics tag was fired because it matches the condition in the trigger Step 12 screenshot

Under "Summary," click trash button to clear data Step 13 screenshot

Go to your site in the other tab and click "Privacy Settings" Step 14 screenshot

Click slider to deactivate "Google Analytics" Step 15 screenshot

Click "Save Settings" Step 16 screenshot

Click "Refresh" and click randomly and scroll Step 17 screenshot

Click on page_view event again Step 18 screenshot

Click on Tags Step 19 screenshot

Because Google Analytics was disable by the visitor, we see this Tag is under "Tags Not Fired" Step 20 screenshot

In conclusion, this means that we have both:

  1. Properly setup our sGTM Server container to receive data from the browser and send it to Google Analytics, and
  2. As the Usercentrics sGTM Server is integrated together with the Usercentrics CMP, it respects the visitors consent choices and handles data appropriately.