Identify users at registration (Cordova)

The account-registered signal is how your Cordova 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: JavaScript, with TypeScript definitions

Platforms: iOS and Android — the steps below apply to both. See Platform parity for details.

Availability: Pro, Premium, and Ultimate


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 ID or Email Address).
  • identifierValue — the value itself.

signalType tells the backend which signal to record — pass 'accountRegistered' explicitly to record this as an Account Registered event. Unlike sign-in, this signal type is never the default; if you omit signalType, the SDK sends 'loggedIn' instead, which is the wrong signal for a registration moment.

Choosing an identifier

Use the most stable identifier your account-creation service returns:

  1. Customer ID (preferred when available) — matches your Connect audience's contact key attribute.
  2. Email address or phone number — well-suited for identification when no customer ID is available yet.

Populate multiple attributes at registration

logIdentity() populates one contact attribute per call. To set more than one, call it once per attribute, back-to-back, immediately after the account is created:

await AcousticConnect.logIdentity('Email Address', user.email, 'accountRegistered', {
  registrationMethod: 'email',
});
await AcousticConnect.logIdentity('First Name', user.firstName, 'accountRegistered', {
  registrationMethod: 'email',
});

Use this pattern only for the registration moment itself, when the calls fire back-to-back in the same authenticated context.


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 involving email verification or an external identity provider, it can't fire until the account is confirmed server-side.

Wire format

Pass every signal field as a top-level key in additionalParameters. The object is flat; don't nest values.

Contact mapping

identifierName must match a contact attribute name exactly as it appears in Connect, including capitalization and spacing. Look up attribute names in Connect under Audience > Contacts > Attributes.

Platform parity

logIdentity() is a single bridge method. On iOS it dispatches to logIdentificationEvent, which calls ConnectSDK.shared.identity.log(...) then ConnectSDK.shared.flush(). On Android it calls Connect.logIdentificationEvent(...) then Tealeaf.flushAll(false). Both platforms flush immediately so Connect sees the signal without waiting for the next scheduled batch upload.


Configuration

Method

AcousticConnect.logIdentity(
  identifierName,        // string, required
  identifierValue,        // string, required
  signalType,             // string, optional — pass 'accountRegistered' explicitly
  additionalParameters    // Record<string, string>, required — must include registrationMethod
);
// returns Promise<void>

Parameters

ParameterTypeRequiredDescription
identifierNamestringYesThe contact attribute name this identifier maps to. Case-sensitive.
identifierValuestringYesThe value of the identifier.
signalTypestringYesPass 'accountRegistered'. If omitted, the SDK defaults to 'loggedIn' — the wrong signal for a registration event.
additionalParametersRecord<string, string>YesSignal fields as top-level keys. See Supported fields.

Return value. Promise<void>. The promise rejects with { code, message } if identifierName or identifierValue is empty after trimming, or if the SDK isn't enabled yet.

Supported fields in additionalParameters

Required

  • registrationMethod — any string identifying the registration method, for example 'email', 'passwordless', or 'sso'. The backend requires this field and ignores the signal without it.

Optional

  • registrationSource — where the registration originated.

Basic example

await AcousticConnect.logIdentity(
  'Email Address',
  user.email,
  'accountRegistered',
  { registrationMethod: 'email' }
);

Complete implementation example

async function handleRegistration(email, password, firstName) {
  try {
    const user = await accountService.signUp({ email, password, firstName });

    await AcousticConnect.logIdentity(
      'Email Address',
      user.email,
      'accountRegistered',
      { registrationMethod: 'email', registrationSource: 'Cordova app' }
    );

    navigateToOnboarding();
  } catch (error) {
    console.error('logIdentity failed:', error);
  }
}

Troubleshooting

Signal not appearing in Connect?

  • Verify identifierName and identifierValue are not empty or whitespace-only.
  • Confirm you passed 'accountRegistered' as signalType — if omitted, the SDK sends 'loggedIn' instead.
  • Confirm you called AcousticConnect.enable() first and awaited it before calling logIdentity().
  • useRelease is false by default, so debug logging is already on. Inspect debug logs — the Xcode console or Logcat.

Contact not created or updated?

  • Verify identifierName matches a contact attribute defined in Connect exactly, including capitalization and spacing.
  • All values in additionalParameters must be strings.