SDK
Identify users
Tie ChirpBack data to your signed-in users with email and optional profile traits.
Chirp.identify associates the current session with a real user. Once identified:
- Feedback, survey responses, and announcement views are attributed to the email
- Frequency capping respects the email (not just the device)
- You can target segments by email domain or custom traits
Signature
Chirp.identify(input: IdentifyInput): void
interface IdentifyInput {
email: string; // Required
fullName?: string;
avatar?: string; // URL
phoneNumber?: string;
additionalData?: Record<string, unknown>; // Custom traits
}Minimum usage
Chirp.identify({ email: "jane@acme.io" });With profile and custom traits
Chirp.identify({
email: "jane@acme.io",
fullName: "Jane Doe",
avatar: "https://acme.io/avatars/jane.jpg",
additionalData: {
plan: "pro",
team: "engineering",
signedUpAt: "2026-01-12",
},
});Custom traits in additionalData become available as segment-matching keys in the dashboard — for example, "show this announcement only to users with plan = pro".
When to call it
- After login / session restore — pass the user's email and any traits you already know
- When traits change — re-call
identifywith the updated values; ChirpBack merges them - After signup — pass the new user's email right after the account is created
When not to call it
- Don't call before
Chirp.init— the call is dropped and logs an error. - Don't call with an anonymous placeholder email like
anonymous@example.com— leave the user un-identified instead. ChirpBack handles anonymous users natively. - Don't include sensitive PII in
additionalData— only what you'd be comfortable sharing in your own analytics.
Gotchas
Email is validated. Falsy, whitespace-only, or non-email values are rejected and an error is logged to the console.
- If the user denied analytics consent,
identifyis silently dropped (no events fire, no network call). - Calling
identifyafter init will refresh segment-targeted surfaces — a previously-hidden survey may show, or a shown announcement may hide, based on the new traits.
Logging out
When the user signs out, call Chirp.reset to clear their identity:
function onLogout() {
Chirp.reset();
}