I am working on an amp-story; but can't seem to get a amp-consent modal without utilizing the amp-story-consent default UI. I would like to use a amp-iframe, or just a plain html modal, but neither will render.
Anybody have any luck with this?
Iframe:
<amp-consent layout="nodisplay" id="gdpr-consent-element">
<script type="application/json">
{
"consents": {
"cbsiampconsent": {
"promptIfUnknownForGeoGroup": "eea",
"promptUI": "consentDialog"
}
}
}
</script>
<div id="consentDialog" style="position: absolute; widht: 500px; height: 500px;">
<amp-iframe width="200" height="100"
sandbox="allow-scripts allow-same-origin"
layout="responsive"
frameborder="0"
src="https://www.google.com/maps/embed/v1/place?key=AIzaSyDG9YXIhKBhqclZizcSzJ0ROiE0qgVfwzI&q=iceland">
</amp-iframe>
</div>
</amp-consent>
This is not possible; the only supported consent UI is the default UI that you have mentioned.
See the amp-story-consent
documentation and example for more details.