Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
how to measure click with amp google analytics
<amp-analytics type="googleanalytics" id="analytics3">
<script type="application/json">
"vars": {
"account": "UA-XXXXX-Y" // Replace with your property ID.
"triggers": {
"trackClickOnHeader" : {
"on": "click",
"selector": "#header",
"request": "event",
"vars": {
"eventCategory": 'ui-components',
"eventAction": 'header-click'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment