Segment Tracking Plan (Full)
 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 Snippets
3
Public Site, Docs, Help, Contact
4
<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>>");

// SEE PAGE TAB FOR DETAILS
window.analytics.page(<<category - optional>>, <<name - optional>>, <<properties>>);
</script>
5
6
Logged In Pages (Private App)
7
<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>>");

// GROUP CALL - SEE GROUP TAB FOR DETAILS
window.analytics.group(<<organization.id>>, {
created: <<organization.created>>,
name: <<organization.name>>,
email: <<organization.account.email>>,
login: <<organization.account.login>>
});

// GROUP CALL - SEE GROUP TAB FOR DETAILS
window.analytics.identify(<<user.id>>, {
created: <<user.createdDate>>,
name: <<user.name>>,
email: <<user.email>>,
login: <<user.login>>
});

// PAGE CALL - SEE PAGE TAB FOR DETAILS
window.analytics.page(<<category - optional>>, <<name - optional>>, <<properties>>);
</script>
8
9
ReadyNOThe first snippet above needs to be placed on every public page.
The 2nd snippet needs to be placed on every page inside the app.
We recommend placing it right above the closing </head> tag in your master page template.
10
InstalledNO
11
TestedNO
12
Loading...