For the complete documentation index, see llms.txt. This page is also available as Markdown.

GTM Example: Google Ads User-provided Data Event

Advanced conditioning in Google Tag Manager

This guide explains how to condition the Google Ads User-provided Data Event tag in Google Tag Manager (GTM) using the variables and events injected by the Sirdata CMP.

The Sirdata CMP automatically pushes consent choices into the GTM dataLayer via the sirdataConsent event. The sirdataExtraPurposes and sirdataExtraVendors variables contain the consented Sirdata purposes and vendors respectively, in |ID| format (e.g.: |9|, |10|, |101|).

1) Create the "User-provided data" variable

In GTM, create a variable of type Google Ads User-provided Data:

  1. Variable type: Google Ads User-provided Data

  2. Collection mode: Automatic collection or manually set the collection rules

2) Create the "sirdataExtraPurposes" variable

Create a variable of type Data Layer Variable:

  1. Data Layer Variable Name: sirdataExtraPurposes

3) Create the "sirdataExtraVendors" variable

Create a variable of type Data Layer Variable:

  1. Data Layer Variable Name: sirdataExtraVendors

4) Create the "sirdataConsent" trigger

Create a trigger of type Custom Event:

  1. Event name: sirdataConsent

  2. Select the Some custom events option

  3. Add the following conditions:

    • {{sirdataExtraPurposes}} contains |9| — Automatic collection of identifiers on devices

    • {{sirdataExtraPurposes}} contains |10| — Processing of identification data

    • {{sirdataExtraVendors}} contains |101| — Google Customer Match, Enhanced & Offline Conversions

5) Add the "Google Ads User-provided Data Event" tag

Create a tag of type Google Ads User-provided Data Event:

  1. Google Ads Account ID: enter your account ID

  2. User-provided data: select the variable created in step 1

  3. Trigger: select the trigger created in step 4

The tag will now only fire when the user has consented to Sirdata purposes 9 and 10 as well as the Google Customer Match partner (ID 101).

Mis à jour

Ce contenu vous a-t-il été utile ?