我正在写一个 amp 故事;但如果不使用 amp-story-consent 默认 UI,似乎无法获得 amp-consent 模式。我想使用 amp-iframe,或者只是一个普通的 html 模式,但都不会呈现。
有人对此有任何运气吗?
框架:
<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>