Permissions:
Vendor list-GDPR or Vendor list-U.S. Privacy or Vendor list-U.S. Multi-State
In this article, we will cover how to fire Google Tag Manager (GTM) tags based on a user's consent.
- Install GTM on property
- Configure GTM container
- Add GTM custom event name to vendor
- Add GTM custom event name to purpose
- Test configuration
For the purposes for this article we will fire a tag from GTM when a consent action is triggered for a vendor and for a purpose. Your organization can also fire a GTM tag when a reject action is triggered by selecting Reject Actions at the vendor or purpose level when configuring your vendor list in the Sourcepoint portal.
Use Case
Configure container rules so they do not fire for users in the E.U. and let Sourcepoint manage which containers fire for these site visitors.
Install GTM on property
Follow the directions in your Google Tag Manager account to install Google Tag Manager on your property. Installing GTM on your property requires adding a code snippet to your <head>
tag and a code snippet to your <body>
tag.
Note: Ensure that you define the data layer before Sourcepoint's tags (i.e. add the GTM code snippet before Sourcepoint's tags within the <head>
tag).
Configure GTM container
Configure a container in your Google Tag Manager account to manage the consent action value.
Google Tag Manager Documentation
For the purposes of this article, we are creating a simple tag with a Custom HTML type that will print "Custom tag fired!" to our browser console when triggered.
Note: Additionally, if your organization is concerned with controlling the tag firing frequency on your page we recommend that you expand Advanced Settings and selecting Once per page from the Tag firing options dropdown menu.
While your organization's tag will differ, each tag should be triggered by a Custom Event trigger type. When configuring your trigger please adhere to the following configuration:
Field | Configuration |
Trigger Type | Select Custom Event. This trigger type allows you to set an Event name which Sourcepoint uses to match the consent action value to the trigger. |
Event name | Input a name that will be used in Google Tag Manager and the Sourcepoint platform. |
This trigger fires on | Select All Custom Events. |
When finished, click Submit and follow the prompts to publish your configuration.
Add GTM custom event name to vendor
With your tags configured in GTM, navigate to your Sourcepoint account. Click Vendor Management on the left-hand rail and select a regulatory regime from the subsequent menu.
Select the vendor list you wish to configure
Click the vendor from the vendor list builder page.
Click Consent Actions in the vendor configuration modal and select the Google Tag Manager tab. Alternatively, select Reject Actions if configuring a trigger for when an end-user rejects the vendor.
The Geolocation field should be configured based upon whether the vendor belongs to a GDPR TCF/Standard or U.S. Privacy vendor list. Please refer to the table below for how to configure this field:
Regulatory regime | Configuration |
GDPR TCF/Standard | IN : EEA + UK |
U.S. Privacy | NOT IN : EEA + UK |
Input the Event name configured for the custom event trigger in the provided Value field.
Note: Enter single quotes around the Event name when inputting the name into the Value field. For example, if the Event name is cmp_sample
in the GTM platform then the name should be entered as 'cmp_sample'
.
Click Apply changes when finished to exit the vendor configuration modal. Click Save on the vendor list builder page to publish your changes.
Click the Opt In/Opt Out Hooks tab and ensure Vendor is selected on the subsequent page.
Click + Add Hook.
Select a vendor from the provided dropdown menu and click either Opt In Hooks or Opt Out Hooks depending on your use case.
Use the Geolocation field to select the states and territories the opt in/opt out hook should fire in. When finished, navigate to the Google Tag Manager tab.
Input the Event name configured for the custom event trigger in the provided Value field.
Note: Enter single quotes around the Event name when inputting the name into the Value field. For example, if the Event name is cmp_sample
in the GTM platform then the name should be entered as 'cmp_sample'
.
Click Apply changes when finished to exit the hook configuration modal. Click Save on the vendor list builder page to publish your changes.
Add GTM custom event name to purpose
With your tags configured in GTM, navigate to your Sourcepoint account. Click Vendor Management on the left-hand rail and select a regulatory regime from the subsequent menu.
Click the vendor list you wish to configure and select the purpose from the vendor list builder page.
Click Consent Actions in the purpose configuration modal and select the Google Tag Manager tab. Alternatively, select Reject Actions if configuring a trigger for when an end-user rejects the purpose.
The Geolocation field should be configured based upon whether the vendor belongs to a GDPR TCF/Standard or U.S. Privacy vendor list. Please refer to the table below for how to configure this field:
Regulatory regime | Configuration |
GDPR TCF/Standard | IN : EEA + UK |
U.S. Privacy | NOT IN : EEA + UK |
Input the Event name configured for the custom event trigger in the provided Value field.
Note: Enter single quotes around the Event name when inputting the name into the Value field. For example, if the Event name is cmp_sample
in the GTM platform then the name should be entered as 'cmp_sample'
.
Click Apply changes when finished to exit the vendor configuration modal. Click Save on the vendor list builder page to publish your changes.
Click the Opt In/Opt Out Hooks tab and ensure Privacy Choice is selected on the subsequent page.
Click + Add Hook.
Select a privacy choice from the provided dropdown menu and click either Opt In Hooks or Opt Out Hooks depending on your use case.
Use the Geolocation field to select the states and territories the opt in/opt out hook should fire in. When finished, navigate to the Google Tag Manager tab.
Input the Event name configured for the custom event trigger in the provided Value field.
Note: Enter single quotes around the Event name when inputting the name into the Value field. For example, if the Event name is cmp_sample
in the GTM platform then the name should be entered as 'cmp_sample'
.
Click Apply changes when finished to exit the hook configuration modal. Click Save on the vendor list builder page to publish your changes.
Test configuration
Test your configuration by consenting or rejecting to the vendor or purpose that you have configured across the GTM and Sourcepoint platform. Review to ensure tags are firing and executing as intended.
For the purposes of this article, we should see the phrase "custom tag fired!" logged to our browser console.
Comments
0 comments