logo Axolo
Published

How to use Mixpanel group analytics with Segment for your collaborative SaaS?

Authors

1. What is group analytics and why do you want to use it?

Group Analytics in Mixpanel allows behavioral data analysis as a group. It's well suited for a collaborative SaaS application that allows multiple users of the same organization to interact with your product.

Axolo is a tool to help engineers' teams be more productive on pull requests. We integrate with GitHub and Slack and create a Slack channel for every GitHub pull request.

Up until the day we added Group Analytics on Mixpanel, I was linking and sending all Mixpanel events to the administrator. This kind of works but it's going to be hard to study who are the super-users within a team, and what makes them super users.

2. How do we use Group Analytics at Axolo?

Customer success

Whenever I talk to an existing client, I usually look up their GroupId in Mixpanel and I will be able to see in a single look how they have been using our product, which features they have been using, and if anything seems abnormal.

For companies that are using Axolo in our two weeks trial, it's easy for us to identify trends. Are they using the product like they are supposed to? Will they become customers? I can then prioritize if I need to engage with them to help them use our product in the best possible way. It is also a good way to identify if your customers are the ones that could benefit from a plan upgrade.

⚠️ Mixpanel group analytics comes with additional costs. On top of having more MTU (Monthly tracked users), group analytics was an additional 119$/per year.

2. Setting it up Mixpanel group analytics

When installing it I found the documentation to be scarce and hard to find. Before I go into more details, here are all the links that helped me set up Group Ids both in Mixpanel and Segment:

Mixpanel documentation

Segment documentation:

  1. First things first, make sure add group analytics plan to your Mixpanel account. On this plan builder you should be able to upgrade: https://eu.mixpanel.com/pricing/plan-builder/.
    Mixpanel pricing group analytics
  2. When adding Mixpanel to your Segment destinations, in the setting part, look for Group Identifier Traits setting. You should set this one to 'groupId'
    Segment Group identifier traits
  3. In your Mixpanel project setting set up the groupKey to 'groupId', this will help Mixpanel link the Segment event.
    Mix panel group keys
  4. Start identifying and tracking your groups in your code !

3. Interacting with Segment group API

Segment has a group property you can use to send this kind of event. You will need to give the groupId and the userId you want to track. You can also add traits, you can add as many traits as you want. Some traits are standards like address, description, email, employees, industry, plan, website etc... More information on the segment documentation .

The way to identify a group (calling it for the first time) and to update a group is done exactly the same in Segment.

Segment Group code