Last active
August 4, 2016 22:54
-
-
Save ak--47/bcb82f48ddabde02123990316ab2dafd to your computer and use it in GitHub Desktop.
Ximble: client side mixpanel tracking (example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
//initialize everyone as an unknown user | |
mixpanel.register({"known-user":false}); | |
//build a list of properties to send with the page View event | |
var pageProps = {"page name":$(document).attr('title')} | |
//sends the page load event; a response of 1 on the XHR request means mixpanel got the data | |
mixpanel.track('Page View', pageProps) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment