AMP Project
This is a AMP-enabled website demonstrating how SourcePoint's Privacy Manager can be used when the <amp-consent>
tag is fully implemented.
Here at the top are two ads loaded with <amp-ad>
. The first one contains the attribute data-block-on-consent
meaning that it won't be loaded until the consent user has given consent to the vendors through the consent flow.
At the moment, the flow we're "loading a flow" that does not require the Privacy Manager to be displayed. In the <amp-consent>
configuration, changing the consent ID from "very-long-key-2"
to "very-long-key-1"
will trigger a response to <amp-consent>
that requires the Privacy Manager to be open and the ads will wait for the consent to be displayed.
TODO:
The <amp-consent>
component loads the Privacy Manager in a fully sandboxed <amp-iframe>
and the only way to communicate between the Privacy Manager and the publisher's website is by calling the following "hook" function:
window.parent.postMessage({ type: 'consent-response', action: 'accept/reject/dismiss' }, '*');This hook function needs to be called, for example, when the user clicks on "Save & Close" from within the Privacy Manager.
We also need to implement the specific response expected by the <amp-consent>
component. The is the mock server used in this example page has more informations about the API.