Mixpanel Integration
The Mixpanel integration sends experiment enrollment events to Mixpanel as tracked events with the experiment and variation details attached as event properties. Once set up, you can use Mixpanel's Insights, Funnels, and Flows reports to compare behavior between experiment variations.
Setup
1
Go to Project Settings > Integrations
Open your project, click Settings, then click the Integrations tab.
2
Enable Mixpanel
Find the Mixpanel card and toggle it on.
3
Enter your Project Token (optional)
Enter your Mixpanel Project Token. You can find this in your Mixpanel project settings under Project Details. If you leave this blank, the snippet will auto-detect an existing
window.mixpanel instance initialized on your page.4
Save
Click Save. Events will begin appearing in Mixpanel on the next page load where an experiment runs.
What is sent to Mixpanel
When a visitor is enrolled in a variation, A vs B calls:
javascript
1mixpanel.track('avsb_experiment', {2 experiment_id: 'exp_abc123',3 experiment_name: 'Homepage Hero Test',4 variation_id: 'var_xyz789',5 variation_name: 'Variation B',6 event_name: 'experiment_viewed'7});Viewing in Mixpanel
Events appear in Mixpanel under the event name avsb_experimentwith the experiment and variation details as properties. You can use these in Mixpanel's core features:
- Insights — filter or break down any metric by
variation_nameto compare performance between groups. - Funnels — add the
avsb_experimentevent as the first step, then add the conversion events your funnel tracks. Use thevariation_nameproperty to compare funnel conversion rates between variations. - Flows — view the paths visitors took after being enrolled in each variation.
- Cohorts — create a cohort of users who were enrolled in a specific experiment variation, then use that cohort in any report.
Events appear in real time
Unlike Google Analytics 4 (which has a processing delay), Mixpanel events appear in the Mixpanel interface within a few seconds of being sent. This makes it easy to verify the integration is working — trigger an experiment enrollment and check Mixpanel Live Events.
Tip
If you use Mixpanel's
identify() method to associate your own user IDs with Mixpanel profiles, A vs B enrollment events will be associated with those profiles automatically. This lets you see exactly which experiment variation each user was in when they performed key actions.