Using the FullStory API to control data capture

The FullStory JavaScript API contains two methods which can be used to shutdown (FS.shutdown()) and restart (FS.restart()) capture. Either can be called immediately after the FullStory data capture snippet is executed.

FS.shutdown() stops capturing the current page immediately, but has no other effect. If FS.shutdown() is called immediately after the snippet is executed, data capture won't start (and a new page won't be created) until FS.restart() is called.

FS.restart() will start up again, with a "new" page, meaning, while it doesn't refresh the window, it starts capturing again as though it were a new page.

Both commands are idempotent, meaning that they'll just quietly do nothing if you call them unnecessarily. For example, if you call FS.shutdown() when FullStory is not currently capturing, it will simply do nothing.

Lastly, it is important to note that using FS.shutdown() and FS.restart() without a 30 minute inactivity period will not cause a new session in FullStory.

Capture on startup

In addition to the options listed above, there is an additional configuration you can leverage in your capture process. If you don't want to capture any data until a condition is met, insert the following in your <script> tag before the FullStory snippet:

window[‘_fs_capture_on_startup’] = false;

The value of false prevents FullStory from capturing data on start. When implemented, the FullStory script will not capture data until the FS.restart()call is made.

Need to get in touch with us?

The FullStory Team awaits your every question.

Ask the Community Technical Support