首页 > 解决方案 > 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>

并且不跟踪:有什么想法吗?先感谢您

标签: google-analyticsamp-html

解决方案


推荐阅读