google-analytics - AMP 分析表 - 提交跟踪
问题描述
大家好,我正在尝试在 AMP 网站上跟踪表格。我已经尝试通过 GTM 跟踪成功消息的可见性,并且显然没有从文档中工作,AMP 上的事件跟踪是由这个完成的
<amp-analytics type="gtag" data-credentials="include">
<script type="application/json">
{
"vars": {
"gtag_id": "<GA_TRACKING_ID>",
"config": {
"<GA_TRACKING_ID>": { "groups": "default" }
}
},
"triggers": {
"button": {
"selector": "#the-button",
"on": "click",
"vars": {
"event_name": "login",
"method": "Google"
}
}
}
}
</script>
</amp-analytics>
我试图以这种方式使用它:
<amp-analytics type="gtag" data-credentials="include">
<script type="application/json">
{
"vars": {
"gtag_id": "UA-48872168-2",
"config": {
"UA-48872168-2": { "groups": "default" }
}
},
"triggers": {
"form": {
"selector": "#contact-form",
"on": "submit-sucess",
"vars": {
"event_name": "CATEGORIA",
"method": "AZIONE"
}
}
}
}
</script>
</amp-analytics>
并且不跟踪:有什么想法吗?先感谢您
解决方案
推荐阅读
- microservices - 如何处理多仓库中的共享库版本碰撞?
- reactjs - 如何在 Next.js 中使用自定义主题配置 Ant Design 并支持 CSS 模块功能
- c++ - 无法推断模板参数(对于简单的类函数)
- javascript - 我可以查询以前使用 (element.innerHTML) 添加的按钮吗?
- php - 优化 Laravel 查询
- git - 使用 netbeans,github 恢复使用 Git 丢失的项目
- genymotion - Genymotion Desktop 卡在“正在启动”状态
- mozilla - 如何在 Mozilla 校园俱乐部注册我的大学?
- javascript - 如何更新从模块导入的整数值反应
- python - 如何制作索引为2020年每一天的pandas系列