This topic offers comprehensive instructions to ensure IAB Vendor Tag Blocking. Before finalizing your GTM setup, you should complete the site and consent configurations.
There are three types of triggers included in the sample container file. These three types can be used to cater to the following use cases:
The container export (json container import provided) contains the following sample triggers.
This example is a Custom Event trigger which fires on the __cmpConsents event. This event is dispatched to dataLayer as soon as the user’s consent choices have been registered (load of the page with existing consent and/or when the user closes the consent dialog after having modified their consent choices).
The trigger checks if the Data Layer variable named {{QC - __cmpConsents.iabVendorsWithConsent}} contains the string AppNexus. (This Data Layer variable was automatically created during json import, more details on the variables created during import can be found here) The only way for this string to be present in the Data Layer variable is if the user has given AppNexus consent.
You can thus use this trigger to fire an AppNexus tag as soon as consent is established IF the user has given AppNexus consent.
This example is a Custom Event trigger which fires on the __cmpConsents event. This event is dispatched to dataLayer as soon as the user’s consent choices have been registered (load of the page with existing consent and/or when the user closes the consent dialog after having modified their consent choices).
The trigger checks if the Data Layer variable (see previous chapter) named {{QC - __cmpConsents.iabVendorConsentIds}} matches the regular expression (^|,)32(,|$). This regular expression basically looks for the ID 32 (which is AppNexus’ ID number) in the consent ID string. The only way for this ID to be present in the Data Layer variable is if the user has given AppNexus consent.
You can thus use this trigger to fire an AppNexus tag as soon as consent is established IF the user has given AppNexus consent.
This example is a Custom Event trigger, which blocks any tag (to which it has been added as a trigger exception) from firing if the user has not given AppNexus consent.
The trigger fires on all events by using the .* regular expression match for the event name. This way it can be added to any tag, regardless of the triggers the tag has.
The blocking condition is the reverse of what the condition would be if this trigger should fire an AppNexus tag. Thus it checks that the {{QC - __cmpConsents.iabVendorsWithConsent}} string does not contain AppNexus, as this indicates that the user has not consented to AppNexus to fire.
You can thus use this trigger to block any AppNexus tag from firing if appropriate consent has not been given.
This example is a Trigger Group, which fires the tag as soon as the All Pages trigger has fired AND the QC - Consent_SAMPLE - AppNexus trigger has fired.
The All Pages trigger fires on the page load as soon as the GTM container has loaded, and the QC - Consent_SAMPLE - AppNexus (see above) trigger fires as soon as consent has been established and AppNexus has been granted consent.
The purpose of the Trigger Group is to combine two triggers so that the tag doesn’t execute until both have successfully fired. You can thus use it as a deferring mechanism, so that your tag that would normally fire on All Pages or a DOM Ready trigger, for example, now has to also wait for consent to be established.
By installing this SDK update, you agree that your Children Privacy Compliance setting remains accurate or that you will update that setting, whenever there is a change in your app's audience. You may update the app's Children Privacy Compliance settings at https://publisher.inmobi.com/my-inventory/app-and-placements.