Amplitude

Track and analyze referral program data alongside product analytics in Amplitude.

circle-info

Note: The Amplitude integration is only available to users on the GrowSurf Business plan or higher.

How It Works

After connecting, the Amplitude integration transmits data to your Amplitude 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 an Amplitude event. For referred friends, if they sign up using your Share URL, GrowSurf also sends an event.

circle-check

Tracked Events

The following events will be emitted with the growsurf_ prefix.

Event
Description
Explanation

growsurf_referral

[Referred friend] New referral signup

Records when a referred visitor signs up through a referral link. This includes:

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()arrow-up-right.

growsurf_signup

[Referrer] New referrer signup

Records when someone generates a referral link and joins the campaign as a participant.

This includes:

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

Example Events

Events correspond with the events listed in the growsurf.subscribe()arrow-up-right method. To see examples of the raw JSON data, please see the Example Responsearrow-up-right section.


How to Set Up

Step 1: In Campaign Editor > 4. Options > Integrations, open the Amplitude integration card and enter your Amplitude API keyarrow-up-right.

circle-info

Note: If you are 100% certain that you already have Amplitude installed on your website, you do not need to enter in the Amplitude API key. Simply press Connect and the integration will be enabled. However, we recommend that you still enter it to account for URLs that do not have Amplitude installed.

Step 2: Once connected, GrowSurf will have all events enabled by default. Disable any events that you do not want to track.

triangle-exclamation

Once GrowSurf events get emitted, you will see them show up in Amplitude > Live Events (see image below).

circle-info

Note: Please allow up to 15 minutes of processing time for events to appear (in some cases where Amplitude is backed up, it can take longer).

Within Amplitude, 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 campaign. Please make sure that the GrowSurf participant email address that you are passing in matches the one you were expecting for the Amplitude user:

  • If you pass in a data-grsf-email attribute to a GrowSurf embeddable elementarrow-up-right

  • If you pass in an email address via URL parameter ?grsf_email

  • 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 Campaign 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 Amplitude.

  • 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 Amplitude to process the event.

If you are receiving events, but were NOT expecting them:

  • To ensure no non-GrowSurf-related events are sent to your Amplitude 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.

Last updated

Was this helpful?