Skip to content

Instantly share code, notes, and snippets.

@ianstormtaylor
Last active December 14, 2015 06:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianstormtaylor/5045414 to your computer and use it in GitHub Desktop.
Save ianstormtaylor/5045414 to your computer and use it in GitHub Desktop.
Here's how to easily convert your KISSmetrics calls to Segment.io calls.
/**
* Identify
*
* KISSmetrics' identify and set calls turn into an analytics.identify call.
*/
_kmq.push(['identify', 'USER_ID_HERE']);
_kmq.push(['set', {
name : 'Achilles',
email : 'user@example.com'
}]);
analytics.identify('USER_ID_HERE', {
name : 'Achilles',
email : 'user@example.com'
});
/**
* Track
*
* KISSmetrics' record call turns into an analytics.track call.
*/
_kmq.push(['record', 'Sign Up', {
plan : 'Premium'
}]);
analytics.track('Sign Up', {
plan : 'Premium'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment