Mixpanel
Track and analyze referral or affiliate program data alongside product analytics in Mixpanel.
How It Works
After connecting, the Mixpanel integration transmits data to your Mixpanel account, enabling analysis and reporting on your referral or affiliate program.
For referrers, when they are added to your program (e.g., they get a referral link generated) or if they click a social share button (like Facebook or LinkedIn), GrowSurf sends a Mixpanel event. For referred friends, if they sign up using your Share URL, GrowSurf also sends an event.
Tracked Events
The following events will be emitted with the growsurf_ prefix.
growsurf_referral
[Referred friend] New referral signup
Records when a referred visitor signs up through a referral link. This includes:
Those who submit the form on your website that has referral tracking enabled (via the Program Editor)
Adding a referred participant via
growsurf.addParticipant()
growsurf_referral_trigger
[Referred friend] Referral triggered
Records when a referred participant completes the desired qualifying action, which triggers a referral. Only applies when you are using growsurf.triggerReferral().
growsurf_signup
[Referrer] New referrer signup
Records when someone generates a referral link and joins the program as a participant.
This includes:
Direct signups (someone entering in their email address on the GrowSurf form)
Passing in an email address via URL parameter
?grsf_emailPassing in an email address via
data-grsf-emailattribute on an Embeddable ElementAdding a participant via
growsurf.addParticipant()
growsurf_share
[Referrer] Social media share
Records when a referrer shares their link by clicking 'Copy Link' or clicking a social media button
growsurf_invite
[Referrer] Email invite(s) sent
Records when a referrer sends invitation(s) via email
Example Events
Events correspond with the events listed in the growsurf.subscribe() method. To see examples of the raw JSON data, please see the Example Response section.
How to Set Up
Step 1: In Program Editor > 4. Options > Integrations, open the Mixpanel integration card and enter your Mixpanel project token.

Step 2: Once connected, GrowSurf will have all events enabled by default. Disable any events that you do not want to track.
Once GrowSurf events get emitted, you will see them show up in Mixpanel > Events (see image below).

Within Mixpanel, if you click on a user, you'll be able to view specific details about the event.

Troubleshooting Tips
Here are common scenarios and how to troubleshoot them.
If you are seeing a wrongly identified user:
There are 5 different ways that GrowSurf participants can be added to your program. Please make sure that the GrowSurf participant email address that you are passing in matches the one you were expecting for the Mixpanel user:
If you pass in a
data-grsf-emailattribute to a GrowSurf embeddable elementIf you pass in an email address via URL parameter
?grsf_emailIf you are using
growsurf.addParticipant()If you enter an email address via the GrowSurf form
If you are a referred friend and you submit the form that has referral tracking configured on it from the Program Editor > 5. Installation step
If you are not receiving events, but were expecting them:
Make sure you do not have any ad-blockers or browser extensions blocking requests to Mixpanel.
Make sure to whitelist the URL where events are being tracked (e.g, if your referrer clicks the Facebook share button from https://app.yoursite.com/refer, you'll want to make sure you whitelist that root domain. If a referred friend signs up on your Share URL, make sure to whitelist the Share URL as well).
If you just submitted an event, make sure that you've allowed up to 15 minutes for Mixpanel to process the event.
If you are receiving events, but were NOT expecting them:
To stop GrowSurf from sending anything to Mixpanel, disconnect the integration. Turning off every event is not enough.
If you're receiving events without a GrowSurf-related prefix (e.g.,
growsurf_), it indicates that GrowSurf may not be emitting these events. Please check other parts of your code to find where these events might be occurring.
Last updated
Was this helpful?