Preview Mode

Who can use this feature?
- Available all plans.
- Requires an admin role to configure.

With Fullstory’s Preview Mode, Admins have the ability to test new data capture rules before pushing changes live for actual end-users. This feature gives Admins confidence in new iterations of their data capture settings and allows data capture rules to be tested without a separate staging environment.

Note: Versions 1.35 and higher of our Mobile SDK are required to use this feature.

Scoping Data Capture Rules

Core to the Preview Mode functionality is the ability to scope your Element Data Capture Rules. As you can see in the image below, Admins have the ability to set each data capture rule to one of four different scopes: Preview Sessions Only, Live Sessions Only, Preview and Live Sessions and No Sessions (Inactive).

Note: While only Admins have permission to modify data capture rules, anyone with access to Preview Mode via the web bookmarklets or Android/iOS Preview Mode builds will be affected by Preview rule changes.

Screen Shot 2022-06-30 at 12.46.06 PM.png

This table provides short descriptions for each of the four rule scopes:

Rule_Scope_Descriptions.png

Once you have a set of rules scoped for Preview Mode, test them out by capturing a preview session.

Capturing a Preview Session (Web)

Note: Fullstory must be actively capturing data on a page in order to capture a preview session. 

In order to capture preview sessions, an Admin will click the “Capture a Preview Session” button in the Element data capture rules table as seen here:

Screen Shot 2022-06-30 at 12.46.06 PM.png

Clicking this button will prompt the Admin to set a short-lived 3rd party cookie that will expire after 12 hours (or after clicking “End Preview Session” on the Preview Mode banner). The dialog box looks like this:

Screen Shot 2022-06-30 at 12.48.05 PM.png

Clicking “Set Preview Session Cookie” will provide you with the confirmation message seen here:

Screen Shot 2022-06-30 at 12.48.27 PM.png

While this cookie is active, Preview sessions will be captured for the Admin when they navigate the site or app associated with their Fullstory account. While Preview session data capture is active and an Admin is browsing their own site, a hide-able banner will be inserted at the top of the the page that will look something like this:

Preview_Mode_Banner.png

As you can see, this banner includes several buttons.

Banner_Controls.png

Once you have completed testing of any new data capture rules, you can simply let your Preview Mode cookie expire or you can exit preview mode by clicking the “End Preview Mode” button.

If you're unable to use Preview Mode due to restrictions on third party cookies, you can create bookmarklets that you can add to your browser. Clicking on the bookmarklet will enable or disable preview mode on the page you're viewing.

Create your Enter Preview Mode and Exit Preview Mode bookmarklets using the code snippets below: 

Enter Preview Mode: 

javascript:location.search=location.search.replace(/^(\??).*$/,function(e,r){return e+(r?'&':'?')+'_fs_preview=true'});

Exit Preview Mode:

javascript:location.search=location.search.replace(/^(\??).*$/,function(e,r){return e+(r?'&':'?')+'_fs_preview=false'});

Hopefully Preview Mode leaves you feeling more empowered than ever to properly manage your privacy settings in Fullstory. If you would like to learn more about Private by Default and Fullstory's Element Data Capture Rules, please check out this article.

Capturing a Preview Session (Android & iOS)

In order to capture sessions in Preview Mode, you will need to create a Preview Mode build of your app. To enable it on Android, add previewModeEnabled true in the fullstory { ... } block of your app's build.gradle file. On iOS, add a boolean key named PreviewMode set to true to the Fullstory dictionary in your app's Info.plist file.

When Preview Mode is enabled, you should see a banner across the top of your app to make it apparent you are using a Preview Mode build. For Android, it should look similar to this:

PreviewModeBannerAndroid.gif

Note: This banner does not intercept touch, with the exception of the dismiss icon on the right, allowing you to interact with any UI that may appear behind it. Once dismissed, the banner will not reappear until the app is started again in a new process.

For iOS it should look something like this:

PreviewModeBannerIOS.gif

Preview Mode builds should never be distributed to end-users, because Preview-scoped data capture rules are for testing and introduce a risk of capturing sensitive information. Some precautions are put in place to help avoid this in addition to the in-app banner. Android builds will mark the application as debuggable in the AndroidManifest.xml as long as addDependencies is enabled, which it is by default. iOS builds will not allow archiving with Preview Mode enabled and will disable Preview Mode at runtime for production builds.

Testing Changes to Data Capture Rules

To help reduce the risk of unintended user-data capture, a list of steps for testing various changes to data capture rules is provided here.

Adding a New Rule

  1. Create the new rule to be tested, changing the scope to Preview Sessions Only before saving.
  2. After verifying changes in Preview Mode, update the scope to Preview and Live Sessions.

Modifying / Replacing an Existing Rule

  1. Update the scope of the existing rule to Live Sessions Only.
  2. Create the new / updated version of the existing rule, changing the scope to Preview Sessions Only before saving.
  3. After verifying the changes in Preview Mode, update the scope of the new rule to Preview and Live Sessions.
  4. Then change the scope of the original rule to No Sessions (Inactive), or remove the rule.

Deleting a Rule

  1. Update the scope of the rule to Live Sessions Only.
  2. After verifying the changes in Preview Mode, update the scope to No Sessions (Inactive), or remove the rule.

Need to get in touch with us?

The Fullstory Team awaits your every question.

Ask the Community Technical Support