Workforce - Capture Internal App Data with the Fullstory Snippet

Who can use this feature?
- Available with Workforce.
- Requires an Admin role to configure.

Interested in a demo of Workforce? Contact us here.

The default deployment of Workforce consists of deploying the Workforce browser extension and then configuring apps for data capture. However, for custom-built internal applications, you may wish to configure the app to capture data via the Fullstory snippet rather than rely on the Workforce browser extension.

This article will discuss the benefits and tradeoffs of taking a snippet-based approach to data capture as well as walk you through the steps of getting set up.

Workforce Configure Internal App

When to use the Fullstory snippet

Customers who are already familiar with deploying Fullstory via the browser snippet will understand how this approach can work for internal apps. With a snippet-based approach, you get full access to the Fullstory Browser API, which enables you to send in more custom data than would traditionally be available with the Workforce browser extension. You also get access to features like Fullstory developer tools. On the flip side, certain Workforce features—such as the Feedback Widget—aren't available with a snippet-based data capture approach.

At a high level, capturing app data via the Fullstory snippet is going to be helpful to internal app development teams that are using the Workforce data to improve the application experience for the company's employees. In contrast, the Workforce browser extension is more plug-and-play and is likely the preferred approach if easy of deployment is the higher priority.

See Data Capture in Workforce for a detailed comparison of the two approaches when it comes to data capture. Note that you'll need to instrument your own calls to the Browser API for user identity and page (app) properties, which is explained below.

Workforce feature availability when using the Fullstory snippet

In addition to the data capture differences mentioned above, there are also differences in how certain Workflow-specific features work when capturing data via the Fullstory JavaScript snippet.

  Workforce browser extension Fullstory JavaScript snippet
Toggle Capture by Domain Supported Supported
Toggle Privacy by Domain Supported Not Supported.

Uses the privacy settings defined in Analytics Settings > Data Capture and Privacy > Privacy. Use a code-first approach to privacy or configure data capture rules

See below.
Feedback Widget Supported Not Supported
Workforce browser extension > Active observation indicator Supported Not Supported.

Apps configured to capture data with the Fullstory JavaScript snippet will still show up in the "Apps" list in the Workforce browser extension, but the extension's icon won't change to indicate that a session is being recorded.
Workforce browser extension > Get session replay link Supported Not Supported.

Because the session isn't being captured via the Workforce browser extension, there won't be a session replay link to copy.

Setting up apps for data capture with the Fullstory snippet

There are four high level areas you need to consider when setting up internal apps for data capture with the Fullstory JavaScript snippet:

  1. Configure the internal app in Workforce
  2. Install the Fullstory JavaScript Snippet on your custom app
  3. Use the Browser API to set up customer user and page properties
  4. Data privacy when capturing via the Fullstory snippet

Configure the internal app in Workforce

The first step is to configure the internal app in Workforce.

  1. Follow the steps for Adding a new app manually.
  2. For the General section, you'll want to fill out the information as if your company is the vendor.
    • App Name: The name of your internal app.
    • Vendor Name: Your company name.
    • Vendor ID: A string representation of your company name that can be referenced in code.
  3. Fill out any other information under General and Ownership & License Details that you wish.
  4. Under Domain Capture & Privacy, click Add domain....
    • Enter the Domain of your internal app.
    • Ensure Capture is checked.
    • Ensure Snippet is checked.
    • Note: Privacy will be disabled once Snippet is checked. See below for privacy considerations with snippet deployment.
  5. For Feedback Widget, leave set to Off.

    Note: The feedback widget is not supported when deploying via the Fullstory snippet. However, if you have an internal app with multiple domains and some of those domains capture data via the snippet and some of them capture via the Workforce browser extension, the domains capturing data via the browser extension will be able to use the feedback widget.
  6. Click Save.

Install the Fullstory JavaScript Snippet on your custom app

Once you've configured the internal app in Workforce, you're ready to add the Fullstory JavaScript snippet to your custom app. While you're welcome to install the Fullstory snippet using any of the methods outlined on our site, the steps below will focus specifically on manually copying the snippet into the <head> tag of your site's HTML.

  1. From within Workforce, click the menu in the top left and choose View in Analytics.
  2. Now that you're in Fullstory Analytics, click the menu in the top left and choose Settings.
  3. Under Data Capture and Privacy, click Fullstory Setup.
  4. Click Install your Fullstory snippet. Note: Any of the methods listed on that page will work.
  5. Click Copy to copy the snippet to your clipboard.
  6. In your site's HTML, insert the snippet into the <head> tag.

See Installing the Fullstory Script for additional information.

At this point, if you deploy your internal app, you should start to see sessions flowing into Workforce. To confirm, navigate to your internal app after it's been deployed, and then do the following:

  1. Go to Fullstory Analytics for your Workforce account.
  2. Click the + Create button.
  3. Choose Segment.
  4. Under Segment Filters > Event Filters, click the Refine event by... button next to "Any activity".
  5. Set when the to "Visited URL" and then enter the domain of your internal app, like so:

     
     
  6. If successful, you should see matching sessions show up below.

Use the Browser API to set up customer user and page properties

In order for the app to function like apps that are configured for data capture with the Workforce browser extension, you need to use the Fullstory Browser API to capture certain user and page properties.

Observe what existing user data is being captured

Assuming sessions are already being captured via the Workforce browser extension, you can perform the following steps to see what user data is being captured by the browser extension:

  1. Go to Fullstory Analytics for your Workforce account.
  2. Navigate to the Everyone segment.
  3. In the Session Playlist, click the first identified user.
  4. Note the User Properties that are being captured.

    Note: "User ID" in the Fullstory interface is uid in the Browser API. "Email" is email.

Implement FS('setIdentity') for employee identification

Now that you know what user data is being captured by the Workforce browser extension, you can implement the Browser API FS('setIdentity') method to pass that information to Fullstory via your internal application. See Identifying users for a complete guide, but you can use the following code as an example:

FS('setIdentity', {
  uid: "ben@cargorentalsfs.com", 
  properties: {
    email: "ben@cargorentalsfs.com"
}});

In the above example, the uid happens to be the email address of the user because the Workforce Google Chrome extension identifies users based on email address. It's possible that other implementations of the Workforce browser extension could use a different identifier for the uid, which is why you always want to observe what existing user data is being captured, as described above.

Make sure to call FS('setIdentity') on every page load when the employee is logged on.

Implement FS('setProperties') for app identification

The next step is to set the app information via the FS('setProperties') API. See Sending custom page data to Fullstory for a complete reference and refer to the guidance below for Workforce-specific details.

The app data you send to Workforce should match how you configured the app in Workforce (see above). The following table maps the Workforce user interface labels to the appropriate property name to be used with the API.

Browser API Property Name Workforce App Field Name
system App ID
App App ID
Vendor Vendor ID
(not provided via the API) App Name
(not provided via the API) Vendor Name

Using the above table to map the Workforce user interface fields to their Browser API property names, we can use code similar to the following example:

FS('setProperties', {
  type: 'page',
  properties: {
    system: 'internal-app',
    App: 'internal-app',
    Vendor: 'cargo-rentals-fs'
}});

Make sure to call FS('setProperties') on every page load.

Data privacy when capturing via the Fullstory snippet

When capturing data via the Fullstory snippet, the Privacy checkbox on the the App configuration page will use the privacy settings defined in Analytics Settings > Data Capture and Privacy > Privacy. Use a code-first approach to privacy or configure data capture rules.

See Privacy and Data Capture Rules in Workforce for a detailed guide.

Frequently Asked Questions

Can I disable data capture for apps configured with the snippet via the Workforce interface?

Yes. If you uncheck the Capture checkbox while the Snippet checkbox is checked, Fullstory will stop capturing new sessions once the configuration page is saved. Current sessions will continue capturing data until they are finished.


Was this article helpful?

Got Questions?

Get in touch with a Fullstory rep, ask the community or check out our developer documentation.