How to Search Custom User Data

As you may have read in the FS.identify() and FS.setUserVars() articles, you have the ability to pass custom user data into FullStory via the JavaScipt API. This article will go into depth about how you can use the power of FullStory OmniSearch to find specific events and sessions within FullStory.

Not only is FullStory search useful in searching for the most recent custom user data, but you can also search for historical custom user data. There's a bit of nuance to getting it right, so let's take a deep dive:

Custom User Data and the User Profile

When you send custom user data to FullStory, the properties will show up in the User Profile:

Screen_Shot_2022-07-07_at_11.36.53_AM.png

The values for the user properties correspond to the most recent event that set that custom user property. 

In the example above , "Gold" was the most recent "memberTier" property. The call to set this may have looked like:

FS.setUserVars({"memberTier_str": "Gold"})

Keep in mind that it may take a few minutes for the user properties to be indexed and show up in the user profile in FullStory.

Searching Custom User Data in the User's Profile

When you search for a custom user property, you'll be searching for user data that matches the User Profile.

Screen_Shot_2022-07-07_at_11.38.53_AM.png

Notice how the Member Tier custom user data becomes part of the User Filter section of the search results:

Screen_Shot_2022-07-07_at_11.57.00_AM.png

User Filters and Event Filters

When you search in FullStory, you'll notice User Filters and Event Filters.

Screen_Shot_2022-07-07_at_11.47.24_AM.png

User Filters 

As explained earlier, the criteria in the User Filters section correspond to the user data in the User Profile as it exists now. User filters always corresponds to the latest state of the user data. User Filters are not impacted by the time constraints (e.g. "Past month") in the top left because User Filters only look at the current state of the user profile data, not what it may have looked like in the past. (It is possible to search for user profile data in the past, which we'll explore further below).

Event Filters

Event Filters provide a way to search for specific events that happened during a FullStory session. These events include visited pages, clicked elements, Rage Clicks, etc. Unlike User Filters, the criteria in Event Filters are impacted by the time constraints in the upper left. So for example, if your time box is Yesterday, you'll only see sessions with matching events that happened yesterday.

User Filters with Event Filters

Following the example in the screenshot above, we're saying:

Show me all users who have a "Member Tier" value of "Gold" right now....


....who clicked an element with the text "Purchase" within the past month

The User Filter data is not constrained by time—it's always current—but the Event Filter, is constrained by time.

Searching for Past Custom User Data

Using Event Filters, you can scope the search to look for past user data. Here's an example:

Screen_Shot_2022-07-07_at_11.48.39_AM.png

In the above example, note that we're using an Event Filter to look for users who clicked Purchase. We refined the event to set the scope of the search, which allows us to search for the value of a custom user property at some time in the past. This is because, when we're in the Event Filters section, we're searching for the actual events when the custom user properties were set, not the current state of the user profile data, as is the case with User Filters.

In the above screenshot, note how we're searching for when Member Tier had the value Silver. Contrast this to the screenshot at the very top of the page, where you can see how the latest value—the one stored in the User Profile—is currently Gold. By using event filters to search for data in the past, we're able to go beyond the current user property.

Custom Vars and FS.log

One limitation to keep in mind when searching for custom user data in the Event Filters is that when watching a session it is not possible to see when a particular custom user property was captured. You can trust that it did in fact happen within the session, but it may be difficult to tell exactly when it happened when watching the session. That being said, if you call FS.log() at the same time and with the same data as FS.setUserVars(), you'll be able to see the data in the FullStory console during playback. Here's an example:

function setUserVarsAndLog(data){
    FS.setUserVars(data);
    FS.log(data);
}

setUserVarsAndLog({"favoriteFood_str": "Bananas"})

Running the above code would show up like this within the FullStory console:

Screen_Shot_2022-07-07_at_12.10.50_PM.png

Going Beyond the User Profile

You can unlock many potential use cases for custom properties when you go beyond the User Profile data and begin using custom user data for search as well. Here are a few custom property ideas that, if implemented, would unlock new search opportunities:

  • Note when a user saw an error message. You would then be able to search for sessions when a particular error message was seen.
  • Note when a particular product feature was utilized. This would let you construct segments based on product usage.
  • Note when a customer has a particular attribute. For example, if you wanted to capture account state, you could search for events where "Account State" was "In Trial".

With the power of custom user properties and OmniSearch, you can take full control of what becomes searchable within FullStory.

Need to get in touch with us?

The FullStory Team awaits your every question.

Contact us