Roll Your Own Integration

Didn’t find what you needed in either our supported or manual integrations? Take advantage of our Webhooks or JavaScript and HTTP APIs to create any integration that you need!

Add and Configure FullStory

You know how to get the FullStory snippet running on your site, but do you want to expose configuration for the snippet at some higher layer? Have a look at the first few lines of your recording snippet, which should be similar to the following:

window['_fs_debug'] = false;
window['_fs_host'] = 'fullstory.com';
window['_fs_org'] = 'ABC123';
window['_fs_namespace'] = 'FS';

The variables set in these lines control the behavior of the recording snippet:

  • _fs_debug - Toggles FullStory debug mode. Set this to true if you want to see detailed console logs, and lots of them.
  • _fs_host - For successful recording, please do not change this value; it should always be fullstory.com. 
  • _fs_org - The ID of the org or account into which data should be recorded.
  • _fs_namespace - Used to change the namespace for the FullStory API, to prevent namespace conflicts.

If you are building a tool that needs to deploy the snippet in a multi-tenant environment, you can collect values for the above variables and use them to generate customized snippets for each tenant.

When keeping copies of the recording snippet in a source code or other repository, please be aware that the snippet does change from time to time, typically when we add new features. Older versions of the snippet will continue to record successfully, but newer features will not be available unless the snippet is updated.

Connect FullStory on the Client

The FullStory Browser API provides functions that you can use to integrate FullStory into other platforms that drive your business.

Get a link to the currently recording session

You can use FS.getCurrentSessionURL to grab a link to the current session being recorded. It's a great way to connect FullStory to support tools, but the possibilities are endless.

// This is an example script - don't forget to change it!
// Session URL is available once the _fs_ready event occurs, hence the callback.
window['_fs_ready'] = function() {
  var sessionUrl = FS.getCurrentSessionURL();
  var sessionUrlAtCurrentTime = FS.getCurrentSessionURL(true);
  // TODO: Save the session link to play it again later.
};

Send custom event data FullStory

You can use Custom events to send all kinds of data specific to your site and your users' behavior to FullStory. These events can drive any manner of session filters and segments that you design. FS.event is the browser API function you can use to create custom events. For example, you may want to search for sessions where users added specific products to their online shopping cart. You can do this by instrumenting the Cart button click with a custom event.

FS.event('Product Added', {
cart_id_str: '130983678493',
product_id_str: '798ith22928347',
sku_str: 'L-100',
category_str: 'Clothing',
name_str: 'Button Front Cardigan',
brand_str: 'Bright & Bold',
variant_str: 'Blue',
price_real: 58.99,
quantity_real: 1,
coupon_str: '25OFF',
position_int: 3,
url_str: 'https://www.example.com/product/path',
image_url_str: 'https://www.example.com/product/path.jpg'
});

Add user profile data to FullStory

You can use FS.identify and FS.setCustomVars to build rich profiles of your users in FullStory and search for sessions that match that profile data.

FS.setUserVars({
displayName : 'Daniel Falko',
email : 'daniel.falko@example.com',
pricingPlan_str : 'free',
popupHelp_bool : true,
totalSpent_real : 14.50
});

Connect FullStory on the Server

Use the FullStory HTTP API to build server-to-server integrations. In the below example, you can use the /sessions call to get a list of sessions for a given email.

#!/usr/bin/python
# TODO: Obtain API key and user email to lookup.
headers = {'Authorization':'Basic {}'.format(api_key)}
response = requests.get('https://www.fullstory.com/api/v1/sessions?email='+user_email, headers=headers)
json_data = json.loads(response.text)
for session in json_data:
 # TODO: Do something with the session links.

Need to get in touch with us?

The FullStory Team awaits your every question.

Contact us