Via Google Tag Manager
If you wish to activate Google's Basic Consent Mode via Google Tag Manager (GTM) to have more control over its behavior or to load the Sirdata CMP scripts from GTM, for example, this is entirely possible.
Go to your GTM account, navigate to the "Templates" section, and click on "Search Gallery" in the "Tag Templates" table.
Search for "Sirdata CMP | Google Consent Mode"
Add the "Sirdata CMP | Google Consent Mode" template to the workspace.
Go to the "Tags" section, then create a new tag by selecting the new tag type "Sirdata | Google Consent Mode" which now appears in the custom tags :
Select your criteria or keep the default suggestion (Refer to the official Google Consent Mode page for more information on these criteria if needed) :
Repeat the operation if necessary, for example, if you are making configurations differentiated by country. Click here for more information on these criteria.
Then configure your advanced options and enter your partner and configuration IDs if you wish to load the CMP from GTM :
If you do not load the Sirdata CMP from GTM, it is mandatory to load it from the site, and the CMP scripts must be loaded before the Tag Manager.
Test using the preview mode, and publish if everything works as expected.
To complete the configuration of Basic Google Consent Mode, you need to condition the Google tags (Google Analytics, Google Ads, Google Floodlight, etc.).
a) Conditioning Google Analytics
Create a Custom Event trigger with "sirdataConsent" in the "Event Name" field.
Create a data layer variable named "sirdataExtraVendors".
Add the "sirdataExtraVendors" variable to your trigger by setting it to "contains" and the ExtraVendor ID "|8|".
Add a second data layer variable named "sirdataPurposes" :
Add 3 variables 'sirdataPurposes' for purposes |1|, |8|, and |9| as follows:
To finish, add your "sirdataConsent Google Analytics" trigger to your GA4 tag :
b) Conditioning Google Ads
Create a custom event trigger with "sirdataConsent" in the "Event Name" field.
Create a first data layer variable named "sirdataVendors" :
Add the variable "sirdataVendors" to your trigger by setting it to "contains" and the Vendor ID "|755|".
Add a second data layer variable named "sirdataPurposes":
Add 3 custom events 'sirdataPurposes' for purposes |1|, |3|, and |4| as follows :
To finish, add your "sirdataConsent Google Advertising Products" trigger to your Google Ads tag:
Dernière mise à jour