Skip to main content
Version: Next 🚧

User Management

Call user methods on the Fedo singleton. These must be called after Fedo.initialize.

Anonymous User​

If setUserID is not called, and Feedbacks Screen is opened, anonymous user will be created with random id, and cached. So, next app session will keep using the same anonymous id created before.

Once the user authenticates to your app, you can call setUserID and all interactions (feedbacks created, comments, votes) done by the anonymous user will be migrated to the newly authenticated user. Then the anonymous user is permanently deleted.

info

Data migration only happens when moving from anonymous user to authenticated user

Methods:​

info

All methods below can be called synchronously. An internal queue will handle calling them one by one in the right order. A failing operation is skipped and the queue continues with the next one.

caution

Currently there is no retry or offline support. If any of these calls fails, it will not be retried automatically — you must call it again. Offline support is planned for a future version.

setUserID​

caution

We recommend against calling setUserID for anonymous visitors to your app.

Call setUserID when you know the identity of the current user, passing in their user ID as an argument. This is typically at account registration and at log in.

Calling setUserID with the same id is a no-op.

Fedo.setUserID("user-abc-123")

setUserDisplayName​

Display name shown on feedback and comments created by this user.

Fedo.setUserDisplayName("Jane Doe")

setUserEmail​

Fedo.setUserEmail("jane@example.com")

addUserProperty​

Attach custom key-value metadata to the user (e.g. plan tier, team, beta cohort).

Fedo.addUserProperty("plan", "enterprise")
Fedo.addUserProperty("team", "design")

applying the same key again, will override previous assignments,

Fedo.addUserProperty("tier", "gold")
Fedo.addUserProperty("tier", "silver") // overrides the line before

Predefined User Properties​

The SDK automatically attaches device information to each user. These properties are collected during initialization and updated on each app session.

PropertyTypeDescription
_manufacturerStringDevice manufacturer
_brandStringDevice brand
_modelStringDevice model
_deviceStringDevice name
_osVersionStringOS version string
_sdkIntIntAndroid SDK version
_screenWidthPxIntScreen width in pixels
_screenHeightPxIntScreen height in pixels
_densityDpiIntScreen density (DPI)
_localeStringUser locale
_timeZoneStringDevice timezone
_appVersionNameStringApp version name
_appVersionCodeLongApp version code
info

These properties are automatically collected and cannot be disabled.

logout​

Logs out the currently authenticated user, clear all user cached data (token, ID, name, email, properties), then immediately creates a new anonymous user. If the current user is anonymous, nothing happens.

Fedo.logout()