ampproject / ampproject/amphtml
Consent data object returned from amp-video-iframe runs out of space - need gdprApplies to build ad request
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
We're trying to integrate amp-video-iframe with amp-consent. Using getConsentData method on the iframe source page returns the consent data object from amp-consent, but on the first attempt (page load) it's missing a few key values in the consentMetadata property. In the attached screenshots you can see additionalConsent is returned but gdprApplies isn't. It looks like there's not enough space to return both?
A bit more context - we need to add two things to the video ad request: the consent string and whether consent is required. This is done from the iframe video source page (it allows us to pass other custom params from our DPM etc). This gives the ad server (GAM) the values it needs to personalise ads.
To test this more thoroughly, we’re using the documented API call ‘checkConsentHref’ to get the above values back:
https://amp.dev/documentation/components/amp-consent/
Our feature branch has auth enabled, but the screenshots of the issue are here:
First page load (ConsentMetadata without gdprApplies):

Second page load it returns (ConsentMetadata with gdprApplies but not additionalConsent):

Contributor guide
Assessment
This issue has not been assessed yet.