Identify users at registration (React Native)
The account registered signal is how your React Native app tells Connect that a new user just signed up. The SDK sends an identifier — typically a customer ID or email address — and Connect uses it to create the contact record or match it to an existing one. Once the contact is known, marketers can trigger onboarding journeys, and the rest of the user's session is attributed to that contact. For details on how Connect processes identification records, see How behavior signals are processed in Connect.
Language: TypeScript and JavaScript
Platforms: iOS and Android — the steps below apply to both. See Platform parity for details.
Availability: Pro, Premium, and Ultimate
Requires: Connect React Native SDK version 19.0.9
How identification works
Two parameters do the identification work:
identifierName— the contact attribute in Connect that the value should be matched against (for example,Customer IDorEmail Address).identifierValue— the value itself.
signalType tells the backend which signal to record — pass 'accountRegistered' to record this as an Account Registered event. additionalParameters is descriptive metadata about how the user registered; it is stored alongside the signal but does not affect contact matching.
Choosing an identifier
Use the most stable identifier your account-creation service returns:
- Customer ID (preferred when available). If your Connect audience has a contact key attribute, use it — Connect matches incoming signals against this value to find or create the corresponding contact record. The attribute is often named
Customer ID, but in loyalty-driven apps it can be a loyalty number; either way, it points at the samecontactKeyin your Connect audience. - Email address or phone number. Both are standard channels in Connect and are well-suited for identification when no customer ID is available. Map to the corresponding contact attribute in your Connect audience — commonly named something like "Email Address" or "Phone Number", but the exact name varies by audience.
Populate multiple attributes at registration
logIdentity() populates one contact attribute per call. To set more than one — for example, both an email address and a first name on the same contact — call it once per attribute, back-to-back, immediately after the account is created. Connect attributes both signals to the same session and resolves them to the same contact.
await AcousticConnectRN.logIdentity(
'Email Address',
user.email,
'accountRegistered',
{ registrationMethod: 'email', registrationSource: 'React Native app' }
)
await AcousticConnectRN.logIdentity(
'First Name',
user.firstName,
'accountRegistered',
{ registrationMethod: 'email' }
)Use this pattern only for the registration moment itself, when the two calls fire back-to-back in the same authenticated user context. Do not use it to update an attribute later in the user's session, after sign-out, or across a sign-out / sign-in cycle: the session is not tied to your app's auth state, and a later call could resolve to a different contact than you expect.
Implementation considerations
Registration timing
The account registered signal must fire after the account is created — not when the user submits the sign-up form. For flows that rely on email verification or external identity providers, the signal cannot fire until after the account is confirmed server-side.
Recommended approach: Fire the signal on the post-registration screen or after the account-creation response is confirmed. For SSO-backed registrations, trigger the signal after the callback completes — not during the external provider interaction.
Data sources for identifier value
Several sources of identification are available in React Native apps:
- Values returned directly from your account-creation service
AsyncStorage(persistent, cleared only on uninstall)- In-memory session state (for example, React context or a state management store)
Wire format
Pass every signal field as a top-level key in additionalParameters. The object is flat; do not nest values.
Contact mapping
The identifierName must match a contact attribute name exactly as it appears in Connect, including capitalization and spacing. To look up attribute names, in Connect go to Audience > Contacts > Attributes.
Platform parity
logIdentity() is a single bridge method that wraps ConnectSDK.shared.identity.log on iOS and Connect.logIdentificationEvent on Android. Signature, parameters, and return behavior are identical on both platforms, and both read ConnectConfig.json as the same, shared source of truth for the underlying config.
Configuration
The identity signal interface is available as soon as the Connect SDK is initialized.
Method
import AcousticConnectRN from 'react-native-acoustic-connect'
AcousticConnectRN.logIdentity(
identifierName: string,
identifierValue: string,
signalType?: string,
additionalParameters?: Record<string, string>
): Promise<boolean>Sends the account registered signal, associating a named identifier with a value. Returns a Promise — await it so that any upstream error handling can react to a false result.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
identifierName | string | Yes | The contact attribute name this identifier maps to. Must match exactly as it appears in Connect — case sensitive. |
identifierValue | string | Yes | The value of the identifier. |
signalType | string | No | Pass 'accountRegistered'. Required to record this as a registration signal — the SDK default is 'loggedIn', so this parameter must be explicitly set. |
additionalParameters | Record<string, string> | No | Signal fields as top-level keys. See Supported fields below. |
Returns Promise<boolean>. Resolves to true if the signal was dispatched, false if either identifier field is blank after trimming. Never rejects.
Supported fields in additionalParameters
Required
registrationMethod— any string identifying the registration method, for example'email','passwordless', or'sso'.
Optional
registrationSource— where the registration originated, for example'iOS app','Android app', or'referral'.ssoProvider— the identity provider used, for example'okta'or'azuread'. Only relevant whenregistrationMethodis'sso'.name— short label for this signal instance.description— longer human-readable note describing the event.
Basic example
The example below uses email as the identifier because it is universally available at sign-up. In a production app, prefer a customer ID returned by your account-creation service — see Choosing an identifier above.
import AcousticConnectRN from 'react-native-acoustic-connect'
await AcousticConnectRN.logIdentity(
'Email Address',
user.email,
'accountRegistered',
{ registrationMethod: 'email' }
)This records the Account Registered signal in Connect.
Complete implementation example
Call logIdentity() from your account-creation handler once the account is confirmed:
import AcousticConnectRN from 'react-native-acoustic-connect'
async function handleRegistration(email: string, password: string, firstName: string) {
try {
const user = await accountService.signUp({ email, password, firstName })
await AcousticConnectRN.logIdentity(
'Email Address',
user.email,
'accountRegistered',
{
registrationMethod: 'email',
registrationSource: 'React Native app',
name: 'App account registration',
description: 'User completed account sign-up in the React Native app.',
}
)
navigateToOnboarding()
} catch (error) {
showError(error)
}
}This code is platform-agnostic — no Platform.OS branching is required. It runs unchanged on both iOS and Android builds of the same app.
Troubleshooting
Signal not appearing in Connect?
- Verify
identifierNameandidentifierValueare not empty or whitespace-only. The SDK trims both and returnsfalsewithout throwing if either is blank. - Confirm you passed
'accountRegistered'assignalType. If omitted, the SDK defaults to'loggedIn', which will fail validation — a logged in signal requiresloginMethod, notregistrationMethod. - Confirm
additionalParametersincludesregistrationMethod. - Confirm the signal fires after the account is created, not on form submit.
- Enable SDK debug logging: set
useReleasetofalsein ConnectConfig.json, rebuild, and inspect Logcat (Android) or the Xcode console (iOS) for signal dispatch and HTTP 200 responses.
Contact not created or updated?
- Verify the
identifierNamevalue matches a contact attribute defined in Connect — including exact capitalization and spacing. - All values in
additionalParametersmust be strings. If the matching attribute in Connect is typed as number, Boolean, or date, pass the value as a string representation (for example,'42','true', or an ISO 8601 date string) and verify in Connect that the value was coerced to the expected type.
