Skip to content

Instantly share code, notes, and snippets.

@gooley
Created October 9, 2014 19:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gooley/9b7fe1673c5def0f73ea to your computer and use it in GitHub Desktop.
Mixpanel + Preact example
// A standard mixpanel track event takes a name and optional Properties
mixpanel.track("Viewed Dashboard", {"Gender": "Male", "Age": 21});
// Pass account context information along with each Track call using the following properties
{
"_account_id": "333434", // this should be your internal id for the account
"_account_name": "Snapchat" // this should be a display name for the account
}
// pass those properties (along with any others you already pass) with each track call
mixpanel.track("Viewed Dashboard", {"Gender": "Male", "Age": 21, "_account_id": "333434", "_account_name": "Snapchat"});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment