Skip to content

GTM Managed, Testing

(Data Flow version Fully GTM Managed, using GTM Web Container) (Part 3 of 3)

In this step we are going to:

  1. Test if our Web Browser Container is sending data to our Usercentrics sGTM Server.
  2. Test if our Server Container receives that data, and sends it to Google Analytics only if visitor consent is given.

In this process, you will have 4 GTM pages open at once:

  • Web Browser Container, and its Preview
  • Server Container, and its Preview

1. Test if our Web Browser Container is sending data to our Usercentrics sGTM Server.

Go to Google Tag Manager.

You will be taken to your "Google Tag Manager" home page Step 3 screenshot

You should already have a "Server Container" and a "Web Browser Container" Step 3 screenshot

Select "Web Browser Container" you should be taken to the "Web Browser Container" Workspace Step 4 screenshot

Click "Preview" Step 5 screenshot

Type in your regular website url (eg. "https://surfpizzashop.com") Step 6 screenshot

Click "Connect" Step 7 screenshot

A new window is opened with your side, the "Tag Assistant" verifies success

  • This will be a second Open GTM page.

Step 8 screenshot

In this window that shows your site, click randomly and scroll Step 9 screenshot

Get Back to "Preview" window and click "Continue" Step 10 screenshot

Click on one of the events on the left, such as "Scroll Depth" Step 11 screenshot

Click "Data Layer" Step 12 screenshot

You will see the "ucConsentAllowedDps" variable Step 13 screenshot

Open another Google Tag Manager tab or window, for your Server Container.

  • This will be a third Open GTM page.

Go to the "Server Container" page Step 14 screenshot

Now let's test the "Server Container" page. Click "Preview"

  • This will be a fourth Open GTM page.

Step 15 screenshot

To begin, ensure that "Tag Manager - Summary" reflects no activity (it is empty in the left column) Step 16 screenshot

In another tab go to your site in the other tab and click "Privacy Settings" Step 17 screenshot

"Privacy Settings" popup box allows visitors to choose cookie settings Step 18 screenshot

Expand "Marketing" to view more visitor options

NOTE: Vistors may toggle any selections on/off

Step 19 screenshot

To test if we are consent compliant, under "Privacy Settings" deactivate "Google Analytics" (toggle "Google Analytics" off) Step 20 screenshot

Go back to the website and click randomly and scroll Step 21 screenshot

Get back to "Google Tag Manager" and click on event such as "scroll" or "page_view" Step 22 screenshot

Click in "Variables" tab, Consent value has come through from the browser Step 23 screenshot NOTE: Because you as a vistor toggled "no" to Google Analytics, there are no outgoing requests from server.

Click "Request" Step 25 screenshot

Click "Tags" Step 26 screenshot

Google Analytics - Tags Not Fired, as expected Step 27 screenshot

Under "Summary," you can click trash button to clear data

Go back to your site tab and click fingerprint icon for "Privacy Settings" Step 29 screenshot

Reactivate Google Analytics Step 30 screenshot

Click "Save Settings" Step 31 screenshot

Click "refresh" Step 32 screenshot

Click randomly and scroll Step 33 screenshot

Get back to "Google Tag Manager" and click on "scroll" event

"Tags Fired" now includes Google Analytics Step 35 screenshot

Click "Google Analytics GA4" Step 35 screenshot

Under "Firing Triggers" Step 36 screenshot

You can see Google Analytics is included Step 37 screenshot

We have successfully tested that we both have communication between the browser and our Usercentrics sGTM server, and it is compliant with the visitors choices.