Skip to content

Instantly share code, notes, and snippets.

@mlearo
Last active July 9, 2018 18:21
Show Gist options
  • Save mlearo/c46d03fb96676f249f6e663df1444a1d to your computer and use it in GitHub Desktop.
Save mlearo/c46d03fb96676f249f6e663df1444a1d to your computer and use it in GitHub Desktop.
{
"vars": {
"account": "account_name",
"profile": "profile_name",
"visitor_id": "CLIENT_ID(AMP_ECID_GOOGLE)",
"gclid": "${queryParam(gclid)}"
},
"extraUrlParams": {
"page_name": "home page for company x",
"page_topic" : "home page",
"page_platform": "amp"
},
"transport": {
"beacon": false,
"xhrpost": false,
"image": true
},
"requests": {
"base_url" : "https://collect.tealiumiq.com/vdata/i.gif",
"base" : "${base_url}?${tealium}&${dom1}&${dom2}&${datetime}&gclid=${gclid}&tealium_event=${tealium_event}&tealium_event_type=${tealium_event_type}",
"tealium": "tealium_account=${account}&tealium_profile=${profile}&tealium_vid=${visitor_id}",
"dom1": "dom.url=${sourceUrl}&dom.domain=${sourceHost}&dom.pathname=${sourcePath}&dom.title=${title}",
"dom2": "dom.viewport_width=${viewportWidth}&dom.viewport_height=${viewportHeight}",
"datetime": "timestamp=${timestamp}&tz=${timezone}&lang=${browserLanguage}",
"pageview": "${base}&dom.referrer=${documentReferrer}&screen_size=${screenWidth}x${screenHeight}",
"pagetime": "${base}&dom.referrer=${documentReferrer}&screen_size=${screenWidth}x${screenHeight}",
"event": "${base}&scroll_y=${scrollTop}&scroll_x=${scrollLeft}",
"scrollevent": "${base}&scroll_y=${scrollTop}&scroll_x=${scrollLeft}&windowHeight=${availableScreenHeight}"
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageview",
"vars": {
"tealium_event" : "default page view"
}
},
"links": {
"on": "click",
"selector": "a",
"request": "event",
"vars": {
"tealium_event": "Anchor Link Clicked",
"tealium_event_type": "click"
}
},
"pageTimer":{
"on": "timer",
"vars":{
"tealium_event":"pagetime",
"tealium_event_type": "pageTime5Seconds"
},
"timerSpec":{
"interval":5,
"maxTimerLength":4,
"immediate":0
},
"request":"pagetime"
},
"scrollPings":{
"on":"scroll",
"vars":{
"tealium_event":"scroll",
"tealium_event_type":"${verticalScrollBoundary}%"
},
"scrollSpec":{
"verticalBoundaries":[25,50,90]
},
"request":"scrollevent"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment