Segment Tracking Plan (Basic)
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
Comment only
 
 
ABCDE
1
2
Client-side Javascript Snippet
3
<script type="text/javascript">
window.analytics=window.analytics||[],window.analytics.methods=["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],window.analytics.factory=function(t){return function(){var a=Array.prototype.slice.call(arguments);return a.unshift(t),window.analytics.push(a),window.analytics}};for(var i=0;i<window.analytics.methods.length;i++){var key=window.analytics.methods[i];window.analytics[key]=window.analytics.factory(key)}window.analytics.load=function(t){if(!document.getElementById("analytics-js")){var a=document.createElement("script");a.type="text/javascript",a.id="analytics-js",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}},window.analytics.SNIPPET_VERSION="2.0.9",
window.analytics.load("<<YOUR_WRITE_KEY>>");

// identify users SEE IDENTIFY TAB
if(<<user.id>>){
window.analytics.identify(<<user.id>>, {
email: <<user.email>>,
login: <<user.login>>,
name: <<user.name>>,
created: <<user.dateCreated>>,
plan: <<user.plan>>,
calls: <<API calls this month>>
});
}

window.analytics.page);
</script>
4
5
ReadyNOThe snippet above needs to be placed on every page on your site.
We recommend placing it right above the closing </head> tag in your master page template.
Check out the Identify and Events tabs below for the rest of the tracking plan.
6
InstalledNO
7
TestedNO
8
Loading...
 
 
 
Snippet
Identify
Events
 
 
Main menu