segmentio/integration-mixpanel — pull request #4 by cpinto (2014-12-21 21:27:26+00:00)
Title: Add group support on Mixpanel

This patch brings group() support to Mixpanel, by adding users with a property called isGroup set to true and forcing the prefix 'group.' on $distinct_id so that it doesn't conflict with normal users.

It additionally appends a property called "groups" to user properties, that is a unique set of group IDs, making it possible to go from a user to the groups.

This is extremely useful for SaaS businesses with pricing per organisation, enabling analytics such as how often an organisation is active, revenue per organisation, messaging to users of an organisation through Mixpanel, etc.

The biggest problem with this patch, however, is that I have not found a way to test by running it. I am not familiar with Segment's infrastructure, and less so with node.js, however I'm keen to accept reviews and make amendments where needed to make this patch work.