Load only after positive consent

In this scenario, tags are loaded only after consent (positive or negative). If the user consent status is available because the user has already given consent through the CMP, the user consent status is passed to the tag. If the user consent status is not available yet (the CMP is still displayed), the tag is loaded only after positive consent.

Tags and vendors are split into four categories:

The behavior may vary depending on the type of tags and vendors. Please contact your vendors if the behavior you are looking for is not the one currently applied.

Vendors that block the tag by default

You have nothing to add on your side. The current consent state will be sent automatically on each request.

<amp-analytics type="comscore">
<script type="application/json">{ "vars": { "c2": "1234"}} </script>
</amp-analytics>

Vendors

There is no clear list of vendors that automatically collect the user consent status from AMP. They can usually be identified through their AMP configuration by checking if they reference the consentState parameter.

List of vendors and their configurations:

amp-ad with a RTC config

By default, adding data-block-on-consent to your tag will block it as well as the bid request until a positive consent is sent. If the vendor can display non-personalized ads on rejected consent, ads will be displayed but no HTTP request will be done to the vendor.

RTC has the advantage to use macros and is able to send the IAB consent string and state if the vendor has implemented the feature on its side. For more information related to the support of the IAB consent string, please contact your vendors.

To see if the vendor is able to receive the consent state or the consent string, you can take a look at this list and see if the macros CONSENT_STATE or CONSENT_STRING are available in their configuration.

Example of amp-ad with the type DoubleClick and a RTC config with APS.

<amp-ad
data-block-on-consent
width="300"
height="200"
type="doubleclick"
data-slot="/1234"
rtc-config='{
"vendors": {
"aps": {}
}
}'>
</amp-ad>

Summary

Case

RTC Call

Consent State

Consent String

Ad

Page load

Not sent

Not available

Not available

Not displayed

Dismiss the banner

Not sent

Unknown

Not available

Not displayed

With use of data-npa-on-unknown-consent: Non-personalized

Accept consent

Sent

Accepted

Available

Personalized

Reject consent

Not sent

Rejected

Available

Non-personalized

More information about the amp-ad with RTC configuration.

amp-ad without a RTC config

If you want to unblock an amp-ad when a positive consent is given, you can add the attribute in their tags.

<amp-ad
data-block-on-consent
width="300"
height="250"
type="a9"
...
>
</amp-ad>

Summary

Vendors supporting non-personalized ads

Case

Ad

Page load

Not displayed

Dismiss the banner

Not displayed With use of data-npa-on-unknown-consent: Non-personalized

Accept consent

Personalized

Reject consent

Non-personalized

Vendors not supporting non-personalized ads

Case

Ad

Page load

Not displayed

Dismiss the banner

Not displayed

Accept consent

Personalized

Reject consent

Not displayed

More information about the amp-ad without RTC configuration.

Other tags/vendors

If you want to unblock any other tags supporting the data-block-on-consent attribute when a positive consent is given, you can add the attribute in their tags.

<amp-analytics
data-block-on-consent
type="gtag"
data-credentials="include"
>
<script type="application/json">
{
"vars": {
"gtag_id": "1234",
...
},
"triggers": {
...
}
}
</script>
</amp-analytics>

Summary

Configuration

When is the tag loaded

Default (no data-block-on-consent)

Tag is loaded on page load.

With data-block-on-consent

Tag is loaded once a positive consent is given.