Vladimir Pavlov
Vladimir Pavlov

Reputation: 21

(gtag) for AMP No triggers were found in the config. No analytics data will be sent

Try to setup google gtag to amp page. But always receive an error:

[AmpAnalytics gtag] No triggers were found in the config. No analytics data will be sent.

i get example code from https://developers.google.com/gtagjs/devguide/amp setup my GA_TRACKING_ID

<amp-analytics type="gtag" data-credentials="include" id="gtag">
  <script type="application/json">
    {
      "vars": {
        "gtag_id": "<GA_TRACKING_ID>",
        "config": {
          "<GA_TRACKING_ID>": {}
        }
      },
      "triggers": {
        "button": {
          "selector": "#the-button",
          "on": "click",
          "vars": {
            "event_name": "login",
            "method": "Google"
          }
        }
      }
    }
  </script>
</amp-analytics>

As u can see triggers is here, but this error always appear.

Thank you in advance for any and all assistance!

Upvotes: 2

Views: 1453

Answers (1)

holla_a_m_ego
holla_a_m_ego

Reputation: 1

AMP integration with Google Analytics 4 (GA4) is still under development.

Follow the discussion here. Link to the parent issue

Upvotes: 0

Related Questions