Created
March 10, 2012 17:16
-
-
Save edwardhotchkiss/2012162 to your computer and use it in GitHub Desktop.
Jekyll and MixPanel
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
/** | |
* Create Jekyll Object, with mpq wrapper | |
*/ | |
var jekyll = Object.create({ | |
mpq : { | |
track : function(eventName, properties, callback) { | |
properties = properties || {}; | |
callback = callback || function(){}; | |
if (!/localhost/.test(document.location.hostname)) { | |
mpq.track(eventName, properties, callback); | |
}; | |
} | |
} | |
}); | |
/** | |
* Track Event "Post Some-Post" | |
*/ | |
jekyll.mpq.track('EventName', { some : 'data' }); | |
/* EOF*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment