Skip to content

Instantly share code, notes, and snippets.

@jamesshannon
Last active August 20, 2018 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesshannon/d1679c7ed8f501869c405a91a5442a06 to your computer and use it in GitHub Desktop.
Save jamesshannon/d1679c7ed8f501869c405a91a5442a06 to your computer and use it in GitHub Desktop.
{
"requests": {
"1": "\/\/localhost\/amp\/image\/${sample}.jpeg",
"2": "https://www.google-analytics.com/r/collect?v=1&_v=a1&gtm=GTM-N4RJV8M&ds=AMP&aip=true&_s=${requestCount}&dt=${title}&sr=${screenWidth}x${screenHeight}&_utmht=${timestamp}&cid=CLIENT_ID(AMP_ECID_GOOGLE,,_ga)&tid=UA-111111-1&dl=${sourceUrl}&dr=${externalReferrer}&sd=${screenColorDepth}&ul=${browserLanguage}&de=${documentCharset}&jid=${random}&t=pageview&_r=1&a=${pageViewId}&z=${random}&cd1=${sample}",
"3": "\/\/localhost\/amp\/image\/monkey.jpeg?test=%24%7B${ampState%28tabState.index%29}%7D",
"4": "https://www.google-analytics.com/collect?v=1&_v=a1&gtm=GTM-N4RJV8M&ds=AMP&aip=true&_s=${requestCount}&dt=${title}&sr=${screenWidth}x${screenHeight}&_utmht=${timestamp}&cid=CLIENT_ID(AMP_ECID_GOOGLE,,_ga)&tid=UA-111111-1&dl=${sourceUrl}&dr=${externalReferrer}&sd=${screenColorDepth}&ul=${browserLanguage}&de=${documentCharset}&jid=&t=timing&plt=${pageLoadTime}&dns=${domainLookupTime}&tcp=${tcpConnectTime}&rrt=${redirectTime}&srt=${serverResponseTime}&pdt=${pageDownloadTime}&clt=${contentLoadTime}&dit=${domInteractiveTime}&a=${pageViewId}&z=${random}",
"5": "https://www.google-analytics.com/collect?v=1&_v=a1&gtm=GTM-N4RJV8M&ds=AMP&aip=true&_s=${requestCount}&dt=${title}&sr=${screenWidth}x${screenHeight}&_utmht=${timestamp}&cid=CLIENT_ID(AMP_ECID_GOOGLE,,_ga)&tid=UA-111111-1&dl=${sourceUrl}&dr=${externalReferrer}&sd=${screenColorDepth}&ul=${browserLanguage}&de=${documentCharset}&jid=&t=adtiming&plt=${pageLoadTime}&dns=${domainLookupTime}&tcp=${tcpConnectTime}&rrt=${redirectTime}&srt=${serverResponseTime}&pdt=${pageDownloadTime}&clt=${contentLoadTime}&dit=${domInteractiveTime}&a=${pageViewId}&z=${random}"
},
"triggers": {
"9": {
"request": "1",
"vars": {
"gtm.event": "gtm.pageview"},
"on": "visible"},
"11": {
"request": "1",
"selector": ":not(*)${gtm_css_1_0}",
"vars": {
"gtm.event": "gtm.click"},
"on": "click"},
"12": {
"request": "2",
"vars": {
"gtm.event": "gtm.pageview"},
"on": "visible"},
"15": {
"request": "3",
"selector": ":not(*)${gtm_css_3_0}",
"vars": {
"gtm.event": "gtm.click"},
"on": "click"},
"16": {
"request": "4",
"vars": {
"gtm.event": "gtm.pageview"},
"on": "visible","sampleSpec":{"sampleOn":"${clientId}","threshold":1}},
"17": {
"request": "5",
"vars": {
"gtm.event": "gtm.pageview"},
"on": "visible","enabled": "${queryParam(gclid)}"}},"vars": {
"clientId": "CLIENT_ID(AMP_ECID_GOOGLE,,_ga)",
"gtm_css_1_0": ",#samplebutton1",
"gtm_css_3_0": ",#samplebutton1"},"transport": {"beacon": false, "xhrpost": false,"image": true},
"optout": "_gaUserPrefs.ioo"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment