# Fullstory

## How It Works <a href="#sync-with-your-activecampaign-list" id="sync-with-your-activecampaign-list"></a>

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

{% hint style="success" %}
Under the hood, GrowSurf will load the Fullstory JavaScript library, identify participants (both referrers and referred friends) by their email address, and track events. Rest assured, if Fullstory is already installed, GrowSurf ensures the library is not loaded twice and prevents duplicate identity calls.
{% endhint %}

## Tracked Events

The following events will be emitted with the `growsurf_` prefix.

| Event                       | Description                            | Explanation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `growsurf_referral`         | \[Referred friend] New referral signup | <p>Records when a referred visitor signs up through a referral link.<br><br>This includes:</p><ul><li>Those who submit the form on your website that has referral tracking enabled (via the campaign editor)</li><li>Adding a referred participant via <a href="https://docs.growsurf.com/integrate/javascript-web-api/api-reference#add-participant"><code>growsurf.addParticipant()</code></a></li></ul>                                                                                                                                                                                                                                                                            |
| `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()`](https://docs.growsurf.com/developer-tools/javascript-sdk/api-reference#trigger-referral).                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `growsurf_signup`           | \[Referrer] New referrer signup        | <p>Records when someone generates a referral link and joins the campaign as a participant.</p><p></p><p>This includes:</p><ul><li>Direct signups (someone entering in their email address on the GrowSurf form)</li><li>Passing in an email address via URL parameter <code>?grsf\_email</code></li><li>Passing in an email address via <code>data-grsf-email</code> attribute on an <a href="https://docs.growsurf.com/integrate/javascript-web-api/embeddable-elements">Embeddable Element</a></li><li>Adding a participant via <a href="https://docs.growsurf.com/integrate/javascript-web-api/api-reference#add-participant"><code>growsurf.addParticipant()</code></a></li></ul> |
| `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()`](https://docs.growsurf.com/developer-tools/javascript-sdk/api-reference#subscribe-to-event) method. To see examples of the raw `JSON` data, please see the [*Example Response*](https://docs.growsurf.com/developer-tools/javascript-sdk/api-reference#example-response-6) section.

***

## How to Set Up

**Step 1**: In *Campaign Editor > 4. Options > Integrations*, open the Fullstory integration card and enter your [Fullstory Org ID](https://help.fullstory.com/hc/en-us/articles/360047075853-How-do-I-find-my-Fullstory-Org-Id).

{% hint style="info" %}
**Note:** If you are 100% certain that you already have Fullstory installed on your website, you do not need to enter the Fullstory Org ID. 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 Fullstory installed.
{% endhint %}

<figure><img src="https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FMEHV8INVRVv3QCaK1fcz%2Fimage.png?alt=media&#x26;token=90c40d73-6337-4e4b-9059-f4abaa17249c" alt=""><figcaption></figcaption></figure>

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

{% hint style="danger" %}
**Important Note**: Within your Fullstory 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 [GrowSurf-hosted referral portal](https://support.growsurf.com/article/196-where-can-i-find-my-campaigns-dedicated-landing-page)) and the referred friend's landing page (the Share URL you enter in the *Campaign Editor > 5. Installation* step).
{% endhint %}

Once GrowSurf events get emitted, you will see them show up in *Fullstory > Metrics.*

{% hint style="info" %}
**Note:** Please allow up to 15 minutes of processing time for events to appear (in some cases where Fullstory is backed up, it can take longer).
{% endhint %}

***

## How to View Events In Fullstory

Once events are emitted to Fullstory, you'll need to follow these instructions below to set up a metric page for each event.

**Step 1**: From FullStory, click the *Create* button on the left-side nav menu.

<figure><img src="https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FanNr8rUN0f7DcX4erJ4Z%2Fimage.png?alt=media&#x26;token=482f2e69-cf30-41ae-af1f-b3f400fa2563" alt=""><figcaption></figcaption></figure>

**Step 2:** For the title, enter "GrowSurf Share Metrics".

**Step 3**: Scroll to the *Metric Filters* section and select the following for the *Event* dropdown:

* In the first dropdown, select "Custom Event"
* In the second dropdown, choose `growsurf_share` (if you don't see this option, you'll want to make sure there is at least one `growsurf_share` event that exists as Fullstory will auto-generate this option).

Your screen should now look like this:

<figure><img src="https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FRKYZzq3Ag2PCqNXS2cDI%2Fimage.png?alt=media&#x26;token=7fbd8462-2703-4020-9e50-62c2654b2722" alt=""><figcaption></figcaption></figure>

**Step 4:** In the top-right, click the *Save* button. You should now be able to see the metrics dashboard like the image below:

<figure><img src="https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2FKXQdzYAfJX8vhtU9Ik5K%2Fimage.png?alt=media&#x26;token=8a06d084-3da6-49f4-985c-ffedc68beed7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Tip:** If you scroll to the *Session Playlist* section of the metric page, you'll be able to see session replays of users who performed actions.
{% endhint %}

**Step 5:** For each GrowSurf tracking event, you'll want to repeat steps 1 to 4 to add each metric.

***

## **Troubleshooting Tips** <a href="#troubleshooting-tips" id="troubleshooting-tips"></a>

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 Fullstory user:

* If you pass in a `data-grsf-email` attribute to a [GrowSurf embeddable element](https://docs.growsurf.com/integrate/javascript-web-api/embeddable-elements)
* If you pass in an email address via URL parameter `?grsf_email`
* If you are using [`growsurf.addParticipant()`](https://docs.growsurf.com/integrate/javascript-web-api/api-reference#add-participant)&#x20;
* 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 Fullstory.
* 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 Fullstory 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 Fullstory 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.
