Mixpanel
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
Provides integration with the Mixpanel real-time analytics service.
Unlike Google Analytics, Mixpanel isn't for tracking aggregate data about page views. Instead, you send specific events to Mixpanel when users perform certain actions. This allows you to examine how users interact with your site in real-time and connects all events to the individual user who performed them (so you can contact them).
Mixpanel is great for finding ways to improve usability, studying how existing features are actually used and is especially good for startups who are trying to refine their MVP (Minimum Viable Product).
Click here to learn more about Mixpanel!
#D8CX: We pledge that Mixpanel will have a full Drupal 8 release on the day that Drupal 8 is released.
Installing
- Install this module in the normal Drupal way
- Sign-up for a free account on Mixpanel.com
- Obtain your Mixpanel token
- Go to Configuration -> Web services -> Mixpanel
- Copy your Mixpanel token into the appropriate field and click "Save configuration"
See the installation guide for a complete walk-through.
Sending events to Mixpanel
The quickest way to start sending events to Mixpanel, is to simply enable the Mixpanel defaults module. It will send events for:
- Joining and leaving a group (in Organic groups)
- Creating, deleting, updating a user
- User login and logout
- Creating, updating, and deleting a node
- Creating a comment
However, the only way to get really powerful insights into how users are using your application is by sending your own custom events!
You can do this in one of two ways:
- Writing a custom module and calling
mixpanel_track()in PHP ormixpanel.track()in Javascript, or - Using Rules. This is the best option if you want to use Mixpanel but you aren't a coder and can't write your own Drupal module!
(Click one of the above links to see the full documentation on how to do that!)
Drupal 6
In Drupal 6, this module can optionally use Drupal Queue to defer sending events to Mixpanel until cron (while maintaining the correct timestamp). In Drupal 7, this is unnecessary because the Queue API is in core.
Roadmap
- Development is mostly focussed on porting Mixpanel to Drupal 8: #2121821: Port to Drupal 8
- We're considering development of a 2.x branch based on the Mixpanel PHP library, but no development has started: #2052893: Build a 7.x-2x version with the Mixpanel PHP Library
