mixpanel analytics repackaged for Meteor
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
mixpanel-client.js
package.js
smart.json

README.md

meteor-mixpanel

mixpanel analytics repackaged for Meteor

current version of the snippet that loads the other script: 1.2 current version of the mixpanel script loaded from their CDN: 2.2

You'll need to call mixpanel.init('API_KEY_GOES_HERE') in your app code.

The default mixpanel snippet starts loading the bigger mixpanel script from their CDN immediately, assuming that mixpanel.init will be called immediately after the snippet. In Meteor, this isn't necessarily the case because this package will load and then a bunch of other things might happen before your app code gets called.

For this reason, I've modified the snippet to only start loading the other script during the init function, so you can feel free to call mixpanel.init from Meteor.startup or anywhere else in your app.