Info
Content

Google Tag Manager (GTM)

In order to use consent information with Google Tag Manager (GTM), the CMP will push so called data layers into GTM. The CMP will create the following data layer variables:

Variable

Description

cmpGDPR

0 if GDPR does not apply, 1 if GDPR applies

cmpConsentString

Sets the IAB consent string

cmpVendorsConsent

Sets a comma separated list of vendor IDs that got consent, e.g. ,3,7,22,31,88, (list starts and ends with comma)

cmpCustomVendorsConsent

Sets a comma separated list of custom vendor IDs (vendors that are not part of the IAB global vendor list) that got consent, e.g. ,82,112,556, (list starts and ends with comma)

cmpGoogleVendorsConsent

Same as cmpVendorsConsent but included are the Google ATP IDs.

cmpPurposesConsent

Sets a comma separated list of purposes that got consent, e.g. ,1,2,3,4,5, (list starts and ends with comma)

cmpCustomPurposesConsent

Sets a comma separated list of custom purposes that got consent, e.g. ,1,2,3,4,5, (list starts and ends with comma)

In order to display certain codes only if consent is given, please follow these steps:

  1. Create variables in GTM: In GTM go to Variables > New and click on configure:

  2. Choose variable type Page Variables > Data Layer Variable, set the Variable Name and if wanted a default value:

  3. Insert all necessary variables (see table above)
  4. Go to Triggers > New and click on configure:

  5. Use event Name “cmpEvent” and add custom events to it:



    Note: In order to distinguish between vendor “1”, “11” and “111” the consent lists will always start and end with a comma. If you want to make sure the trigger is fired only with vendor 1 you should write “cmpVendorsConsent > contains > ,1,”
Back to top