【发布时间】:2019-11-16 18:50:56
【问题描述】:
我不知道需要在 checkConsentHref 的 URL 引用的文档中放置什么代码。
我使用了来自https://amp.dev/documentation/examples/user-consent/basic_user_consent_flow/?format=websites 的示例代码。
我知道 checkConsentHref 应该是我自己的 url,但是那个位置需要放什么文档,应该放什么代码?
<amp-consent layout="nodisplay" id="consent-element">
<script type="application/json">
{
"consents": {
"my-consent": {
"checkConsentHref": "https://example.com/api/show-consent",
"promptUI": "consent-ui"
}
}
}
</script>
</amp-consent>
我希望在 checkConsentHref 位置有一些功能可以采取某种行动。
【问题讨论】:
-
这里有同样的问题。如果我不必为此设置自己的端点,那就太好了……为什么这不可能?
标签: amp-html