ampproject / ampproject/amphtml

Consent data object returned from amp-video-iframe runs out of space - need gdprApplies to build ad request

Open
#32,583 14 comments 0 reactions 1 assignee Claimed by @alanorozco View on GitHub
Stale Type: Bug WG: components
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):
![Screenshot 2021-02-05 at 17 57 38](https://user-images.githubusercontent.com/7704982/107528421-b5e50280-6bb1-11eb-80cb-2985d712bf4f.png)

Second page load it returns (ConsentMetadata with gdprApplies but not additionalConsent):
![Screenshot 2021-02-05 at 17 56 51](https://user-images.githubusercontent.com/7704982/107528602-edec4580-6bb1-11eb-85bb-ce20f77667f9.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.