GTM Managed, Testing
(Data Flow version Fully GTM Managed, using GTM Web Container) (Part 3 of 3)
In this step we are going to:
- Test if our Web Browser Container is sending data to our Usercentrics sGTM Server.
- 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
You should already have a "Server Container" and a "Web Browser Container"
Select "Web Browser Container" you should be taken to the "Web Browser Container" Workspace
Click "Preview"
Type in your regular website url (eg. "https://surfpizzashop.com")
Click "Connect"
A new window is opened with your side, the "Tag Assistant" verifies success
- This will be a second Open GTM page.
In this window that shows your site, click randomly and scroll
Get Back to "Preview" window and click "Continue"
Click on one of the events on the left, such as "Scroll Depth"
Click "Data Layer"
You will see the "ucConsentAllowedDps" variable
2. Test if our Server Container receives that data, and sends it to Google Analytics only if visitor consent is given.¶
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
Now let's test the "Server Container" page. Click "Preview"
- This will be a fourth Open GTM page.
To begin, ensure that "Tag Manager - Summary" reflects no activity (it is empty in the left column)
In another tab go to your site in the other tab and click "Privacy Settings"
"Privacy Settings" popup box allows visitors to choose cookie settings
Expand "Marketing" to view more visitor options
NOTE: Vistors may toggle any selections on/off
To test if we are consent compliant, under "Privacy Settings" deactivate "Google Analytics" (toggle "Google Analytics" off)
Go back to the website and click randomly and scroll
Get back to "Google Tag Manager" and click on event such as "scroll" or "page_view"
Click in "Variables" tab, Consent value has come through from the browser NOTE: Because you as a vistor toggled "no" to Google Analytics, there are no outgoing requests from server.
Click "Request"
Click "Tags"
Google Analytics - Tags Not Fired, as expected
Under "Summary," you can click trash button to clear data
Go back to your site tab and click fingerprint icon for "Privacy Settings"
Reactivate Google Analytics
Click "Save Settings"
Click "refresh"
Click randomly and scroll
Get back to "Google Tag Manager" and click on "scroll" event
"Tags Fired" now includes Google Analytics
Click "Google Analytics GA4"
Under "Firing Triggers"
You can see Google Analytics is included
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.