Skip to main content
Version: v2

Getting Started

The FullStory Browser API allows developers to

  • manage data capture
  • consume custom event and user profile data
  • generate session replay URLs that can be used to integrate replay deep links with other platforms.

What's new in version 2?

We've redesigned our Browser API from the ground up to provide a sleek, consistent interface that’s easy to use and futureproof. This means any new features won't require a snippet update. In addition, the following changes have been made:

  • Type suffixes are no longer required for custom properties. We infer all custom property types so you don't have to! Additional type fidelity can be achieved by providing an optional schema. See Custom Properties.
  • Each API method has a corresponding asynchronous version that waits until capture has started to resolve. See Asynchronous Methods.

Installing the FullStory Snippet

The FullStory Browser API is available once the FullStory data capture snippet is installed on your users' browser.

A couple of notes about the data capture snippet

  • It’s super small, asynchronous, and designed to be unnoticeable to your users. You can read more about the negligible performance impact of FullStory in this article.
  • Once the FullStory script loads, it captures all web based interactions and mutations.

Getting the snippet from FullStory Settings

You can find the snippet by clicking on Settings > Data Capture and Privacy > FullStory Setup Snippet in Settings

Using the Browser SDK

To install the Browser SDK, run

npm install @fullstory/browser

If you are updating from version 1, be sure to review the updating guide in the README. At a high level, version 2 of the Browser SDK uses named imports instead of wildcard ('*') imports. Replace the following import statement:

import * as FullStory from '@fullstory/browser';

with the following:

import { FullStory, init } from '@fullstory/browser';

Other options for installing the snippet

The snippet also can be installed using:

Auto Capture Functions

Auto capture can be controlled via capture stop, restart, and consent functions.

You can also add a callback handler that gets executed when auto capture is fully initialized.

Custom Data Capture

Custom event, user profile data, and page data can be captured during a user browsing session. These data are indexed by FullStory for search, segment, and metrics creation.

User identity can be managed with the identify and anonymize.

Getting Session Replay URLs

Session Replay URLs can be generated during a user session.

These URLs can be used to integrate session replay links with other tools (for example, integrating with Sentry for error tracking or New Relic for tracing).

Rage Clicks

The Rage Click Hook provides a method to react to FullStory frustration events directly in the browser to trigger workflows locally.

More details about Ragehook use cases can be found here.