Segment
Track and analyze referral program data alongside product analytics in Segment.
Last updated
Was this helpful?
Track and analyze referral program data alongside product analytics in Segment.
Last updated
Was this helpful?
After connecting, the Segment integration transmits data to your Segment account, enabling analysis and reporting on your referral program.
For referrers, when they are added to your campaign (e.g., they get a referral link generated) or if they click a social share button (like Facebook or LinkedIn), GrowSurf sends a Segment event. For referred friends, if they sign up using your Share URL, GrowSurf also sends an event.
Under the hood, GrowSurf will load the Segment JavaScript library, identify participants (both referrers and referred friends) by their email address, and track events. Rest assured, if Segment is already installed, GrowSurf ensures the library is not loaded twice and prevents duplicate identity calls.
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 campaign editor)
growsurf_referral_trigger
[Referred friend] Referral triggered
growsurf_signup
[Referrer] New referrer signup
Records when someone generates a referral link and joins the campaign 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_email
growsurf_share
[Referred] 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
Events correspond with the events listed in the method. To see examples of the raw JSON
data, please see the section.
Step 1: In Campaign Editor > 4. Options > Integrations, open the Segment integration card and enter your Segment write key.
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 Segment > Connections > Sources > Debugger (see image below).
Here are common scenarios and how to troubleshoot them.
There are 5 different ways that GrowSurf participants can be added to your campaign. Please make sure that the GrowSurf participant email address that you are passing in matches the one you were expecting for the Segment user:
If you pass in an email address via URL parameter ?grsf_email
If you enter an email address in via the GrowSurf form
If you are a referred friend and you submit the form that has referral tracking configured on it from the Campaign Editor > 5. Installation step
Make sure you do not have any ad-blockers or browser extensions blocking requests to Segment.
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 Segment to process the event.
To ensure no non-GrowSurf-related events are sent to your Segment account, disconnect the integration completely. Simply toggling off all checkboxes is insufficient.
If you're receiving events without a GrowSurf-related suffix (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.
Adding a referred participant via
Records when a referred participant completes the desired qualifying action, which triggers a referral. Only applies when you are using .
Passing in an email address via data-grsf-email
attribute on an
Adding a participant via
Important Note: Within your Segment account, make sure to whitelist the URLs where these events occur. These are primarily two locations: your referral portal (which might be part of your user portal or web app, or the ) and the referred friend's landing page (the Share URL you enter in the Campaign Editor > 5. Installation step).
If you pass in a data-grsf-email
attribute to a
If you are using