我在 Laravel 上制作了自定义 AMP 页面,今天我收到了搜索控制台错误:脚本标签包含无法解析的无效 json,但是当我检查 AMP 验证器时,它显示代码是有效的。
代码:
<amp-analytics type="gtag" data-credentials="include">
<script type="application/json">
{
"vars" : {
"gtag_id": "UA-xxxxxx-xx",
"config" : {
"UA-xxxxxx-xx": { "groups": "default" }
}
}
}
</script>
</amp-analytics>
删除此代码后,我没有收到警告并且也成功提交了验证请求。
这是网址:https ://wordkosh.com/amp/english-hindi/administrator-meaning-hindi