Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:3d2cd68da8d9078ef55a
Created Jan 31, 2016

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'
}
}
}
}
</script>
</amp-analytics>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment