FullStory API Basics
Data Capture with the FullStory API
The FullStory API allows you to capture custom user and event data. This data will enrich your analysis with FullStory by giving you additional dimensions to create segments and data visualizations that are better tailored to your specific business needs.
There are two modes of API data capture:
- Device data capture
- Server data capture
There are multiple APIs for device data capture, depending on the platform where you’ve installed FullStory:
- Browser API
- Mobile APIs (Android, iOS, and React Native)
The Server API is a REST API that you can use to send user data to FullStory. You can capture user data one user at a time, driven by specific events within your ecosystem (e.g. change in loyalty program status) or you can capture users in batches. Batch user import is convenient if you’d prefer to load user data into FullStory from your customer data platform.
Users that are loaded into FullStory via the REST API can be coalesced into known site or app visitors by calling the Identify function on the device (e.g. FS.Identify) during session capture with a common user Id that is used when capturing server-side user data.
Custom User and Event Properties
Custom properties can be provided for both users and events across platforms (V2 server events beta coming soon, you can try our V1 now).
For example a properties
payload containing key-value pairs that you defined can be included with
server-sent User data:
{
"uid": "xyz123",
"display_name": "Daniel Falko",
"email": "daniel.falko@example.com",
"properties": {
"pricing_plan_str": "paid",
"popup_help_bool": true,
"total_spent_real": 14.50
}
}
V2 of the API for both users and events will be making a small change to custom properties. In V2 type suffixes will no longer be required.
{
"uid": "xyz123",
"display_name": "Daniel Falko",
"email": "daniel.falko@example.com",
"properties": {
"pricing_plan": "paid",
"popup_help": true,
"total_spent": 14.50
}
}
The device APIs also provide a properties collection, referred to as “userVars” in the V1 device API.
Custom Data Type Suffixes
Currently, type suffixes are required on REST API custom property names and optional on device API custom property names. By appending type suffixes to your property names, FullStory will be sure to index properties according to the type you expect, which will make certain types of analysis in FullStory easier. For example, defining a property with a date type suffix ensures that it is represented as a date in the FullStory app UI and that it can be queried as a date when performing analysis.
More details about the type suffixes that FullStory supports can be found here.