A quick summary
The Mixpanel API breaks down into two fundamental things: events and properties. Properties describe events - you can think of them as adjectives for your events.
Events are actions your users take such as a song being played or a poke. Properties are used to describe events, so if you know the age or gender of this user, you can easily attach that information to that event. Properties make the information you send to Mixpanel really valuable and allow us to then provide great analysis.
Mixpanel accepts data across our REST API, you simply GET/POST us the data and we'll take care of the processing, storage, and analysis of that "data point".
What are events?
Events are actionable things that occur, and that you use to organize your data. On Mixpanel you will see a real-time view of the events as you log them, updated immediately when a user interacts with your content. Events are just strings and they can be called anything you want.
What are properties?
Properties are attributes that describe the event that is taking place. Imagine you were building a music site, a common event you might want to keep track of is every time a user plays a song.
Properties let you take this a step further by attaching descriptive data to this event such as the genre of the song being played. Properties are key-value based pairs, so we could define our key as "genre" and our value as the genre of the song being played, such as hip-hop.
Putting it all together in one line of code
This is where the beauty of Mixpanel lies - in a single line of code:
Javascript:mpmetrics.track('song-played', {'genre' : 'hip-hop', 'gender' : 'male', 'age' : 18});You can of course extend this to anything you are building. A photo sharing site may track uploads, an MMO gaming application may track items bought by users, a dating site tracking male/female sign ups, and a real-time search engine may be wondering where people click on links.
Check out code examples page to begin integration, the easiest of course is our dead simple Javascript integration.
How do you track unique visitors?
If you are using the Javascript we automatically track unique visitors via that user's IP Address or you can be explicit by calling: mpmetrics.identify("USERNAME_HERE_OR_ANY_STRING"). If IPs are not accurate enough for you or you want to just test, we offer a special property called distinct_id which mpmetrics.identify sets.
distinct_id can be any string-based unique identifier (e.g. user id, php session string, hashed facebook id, etc.). In funnels we'll use an ip address by default however you can always pass us a distinct_id. For more information on special properties check out our specification page.
What makes us different?
Tracking actionable data specific to your application is important and Mixpanel provides a level of granularity and analysis you won't find anywhere else. Please check out our demo to see Mixpanel in action.
