Skip to content

Instantly share code, notes, and snippets.

Created November 17, 2016 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/68fd8c71323e1e1185e0bf285e3ab1e0 to your computer and use it in GitHub Desktop.
Save anonymous/68fd8c71323e1e1185e0bf285e3ab1e0 to your computer and use it in GitHub Desktop.
<amp-analytics>
<script type="application/json">
{
"requests": {
"pageview": "https://keystone.sitecore81u1/?url=${canonicalUrl}&title=${title}&acct=${account}",
"event": "https://keystone.sitecore81u1/?eid=${eventId}&elab=${eventLabel}&acct=${account}"
},
"vars": {
"account": "ABC123"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
},
"trackAnchorClicks": {
"on": "click",
"selector": "a",
"request": "event",
"vars": {
"eventId": "42",
"eventLabel": "clicked on a link"
}
}
}
}
</script>
</amp-analytics>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment