---
title: Integrate FullStory
slug: web-experimentation/docs/configure-fullstory
docTags: 
createdAt: 2026-07-23T11:40:26.165Z
---

:::hint{type="info"}
This is a third-party integration and is not an Optimizely subprocessor. See Optimizely's [Third-Party Add-Ons & Platform Integration Terms](https://www.optimizely.com/legal/third-party-add-ons-platform-integration-terms/).
:::

This integration is built and maintained by [FullStory](https://www.fullstory.com). Add the FullStory recording snippet to your site, then pass in the experiment, campaign, and variations names and IDs. [Contact FullStory support](mailto\:support@fullstory.com).

:::hint{type="info"}
**📘 Note**
Before you integrate FullStory, contact your Customer Success Manager and confirm the custom analytics is turned on for your account.
:::

## Add the FullStory recording snippet to your site

You have two options for adding the FullStory recording snippet to your site:

- (Recommended) Add the FullStory recording snippet directly to your site.
- Use Optimizely Web Experimentation to add the FullStory recording snippet to your site.

### Option 1: Add the FullStory recording snippet directly to your site

1. Create a [FullStory account](https://www.fullstory.com/signup/).
2. Click the link in the FullStory confirmation email to confirm your account.
3. Log in to your FullStory account, go to **Settings**, and copy your recording snippet.
4. Paste your recording snippet into the `<head>` element in your content management system (CMS) or directly into your application's code.

:::hint{type="info"}
**📘 Note**
Place the FullStory recording snippet above your Optimizely snippet.
:::

FullStory now starts recording sessions for your site visitors.

### Option 2: Use Web Experimentation to add the FullStory recording snippet to your site

Although you should add FullStory directly to your website, you also can add the FullStory snippet through Web Experimentation. 

1. Create a [FullStory account](https://www.fullstory.com/signup/).
2. Click the link in the FullStory confirmation email to confirm your account.
3. Log in to your FullStory account, go to **Settings**, and copy your recording snippet.
4. Go to Optimizely **Settings > JavaScript**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/VJah9aHh3ncQvL_aR3m7M_690b43a-12471c8-settings.png)

5. Paste the FullStory recording snippet in the **Project JavaScript** field.

:::hint{type="info"}
**📘 Note**
Do not include the `<script>` tags.
:::

FullStory now starts recording sessions for your site visitors.

## Pass in experiment or variation names and IDs

When running an [A/B experiment or multivariate testing](docId\:bfpw0F6nvZEwO2sMEk0u9), you may want to compare how visitors interact with the different variations of your pages. By passing custom events from Optimizely to FullStory, you can see and compare user sessions by experiment name and variant name. Use OmniSearch in Fullstory to find sessions that ran with Optimizely Experiments.

1. Go to your Experimentation **Settings** and uncheck **Mask descriptive names in project code and third-party integrations** (under **Privacy** in **Snippet Settings**).

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/x02wvz3W0Z1cfngNv9XMW_69e7563-3553064-fullstory-step-1.png)

2. Click **Save**.
3. Go to **Settings > Integrations** and click **Create Analytics Integration...**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/6mp1V1VpKXXwqBQWODZiA_888868a-75d2c74-fullstory-step-3.png)

4. Select **Using Visual Editor** in the drop-down list.
5. Enter a name for the integration, such as **FullStory IDs**, and select **Create Custom Analytics Integration**.
6. Copy the following code, paste it in the custom field, and click **Save**.

```javascript
(function () {
 function _fs() { return window[window['_fs_namespace']]; }
 utils = window.optimizely.get('utils');
 utils.waitUntil(function () {
   return typeof _fs() === 'function';
 }).then(function () {
   var campaignStates = window.optimizely.get('state').getCampaignStates({ isActive: true });
   for (var campaignId in campaignStates) {
     var c = campaignStates[campaignId];
     if (c.isInCampaignHoldback !== true) {
       var payload = {};
       payload.campaign = {};
       payload.campaign.id_str = campaignId;
       payload.campaign.name_str = c.campaignName;
       if (c.experiment) {
         payload.experiment = {};
         payload.experiment.id_str = c.experiment.id;
         payload.experiment.name_str = c.experiment.name;
       }
       if (c.variation) {
         payload.variation = {};
         payload.variation.id_str = c.variation.id;
         payload.variation.name_str = c.variation.name;
       }
       _fs().event('Experiment', payload, 'Optimizely');
     }
   }
 });
})();
```

7. **Enable** the custom integration you just created by going to **Settings > Integrations** and toggling **Enable Integration** to **on**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/ido2I2IWAT1OsaV3UG6LE_e551485-1a868ca-fullstory-step-7.png)

8. Go to **Experiments** and click the name of your experiment. Under **Manage Experiments**, select **Integrations** and select the **Tracked** checkbox for the FullStory integration that you just created. Click **Save**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Q6QZQIN8L3t3dc6OQCfRI_dceaec1-c79f3ab-fullstory-step-8.png)

Repeat this in each experiment where you want the FullStory integration to run.

You can search by experiment and variation name and IDs in FullStory. Just search for "experiment," "campaign," or "variation" and the values for those fields.

How to [find experiment and variation IDs in Optimizely](docId\:uu6zmA5Bkeqsq84hqUmL3).

## Pass in additional user data (optional)

To pass in additional profile data, you can use FullStory's [setUserVars API](https://help.fullstory.com/hc/en-us/articles/360020623294). To pass in usernames or emails for users you have already identified, use FullStory's [identify API](https://help.fullstory.com/hc/en-us/articles/360020828113). When complete, add the script you have created to your pages by following the instructions you used to add the FullStory snippet (Option 1).

## Switch from custom variables to custom events

This integration uses FullStory's [custom events API](https://help.fullstory.com/hc/en-us/articles/360020623274).

If you use custom variables for experiments, you should update your integration to use custom events. If you have experiments that are currently running, continue using the old integration without making changes to the experiment. Create an integration using custom events (following the instructions in this guide) and use it for future experiments.

## Why use custom events?

Over time, you may run many experiments on your site. Custom events provide an easier and more elegant search experience when you have run multiple experiments or have multiple users engaged in many experiments.
