Set User Properties
Set user properties
Capture custom user data with the FS.setUserVars function, which takes a single argument: an object or dictionary containing simple key/value pairs you'd like to capture.
Parameters
userVars Map<String, ?> required
A map with key/value pairs that provides additional information about your user.
Special Fields
These are reserved field names that can be included in
userVars
that have special meaning and usage.displayName String optional
The value of displayName
is displayed in the session list and on the user card in the app.
email String optional
The value of email
is used to let you email the user directly from the app. The email
value can also be used to retrieve users and sessions via the Get User and List Sessions HTTP APIs.
Limits
- Sustained calls are limited to 12 calls per minute, with a burst limit of 5 calls per second.
Additional Information
- Java
- Kotlin
public static void FS.setUserVars(Map<String, ?> userVars);
Example Invocation
Map<String, String> userVars = new HashMap<>();
userVars.put("displayName", "Ada Lovelace");
userVars.put("email", "ada@example.com");
userVars.put("pricingPlan", "free");
userVars.put("totalSpent", "14.50");
userVars.put("requiresHelp", "true");
FS.setUserVars(userVars);
fun FS.setUserVars(userVars: Map<String, *>): Unit
Example Invocation
val userVars = mapOf(
"displayName" to "Ada Lovelace",
"email" to "ada@example.com",
"pricingPlan" to "free",
"totalSpent" to "14.50",
"requiresHelp" to true,
)
FS.setUserVars(userVars)