Consent status for vendors

This page summarizes how vendors can access the consent state and the IAB consent string of the user in AMP.

<amp-ad> with RTC config

If you are a vendor that needs access to the consent state or the IAB consent string from an amp-ad tag with a RTC config, you can use macros: CONSENT_STRING and CONSENT_STATE to add those information to your requests URL.

<amp-ad> without RTC config

If you are a vendor that needs access to the consent state or the IAB consent string from an amp-ad tag without a RTC config, Didomi allows this feature on page load by sharing the values through the sharedData object.

You can access the data on the window.context object. For more information, please read this section of the AMP documentation.

Didomi is sharing 2 values through window.context.consentSharedData:

  • consentStateValue which contains the consent state (a 0/1 value that indicates if the user has given consent to non-IAB purposes and vendors)

  • consentString which contains the IAB consent string

<amp-analytics>

If you are a vendor that needs access to the consent state or the IAB consent string from an amp-analytics tag, you can follow this implementation by comScore.

Last updated