Created
January 31, 2016 18:21
-
-
Save anonymous/3d2cd68da8d9078ef55a to your computer and use it in GitHub Desktop.
how to measure click with amp google analytics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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