'alias' Method

The alias method is specially designed to link two user identifiers, effectively allowing multiple user profiles to be merged or treated as aliases of one another. This is particularly useful in scenarios where a user might have multiple accounts or identifiers across different platforms or services within the same application.

Usage example

const aliasParams = {
  userId: 'user123',
  anotherUserId: 'user456'
};

intempt.alias(aliasParams);

In this example, the alias method associates the user ID 'user123' with another user ID 'user456', merging any associated data or interactions under a unified profile.

Declaration

The alias method is declared as follows in TypeScript, indicating that it does not return any value:

alias(params: AliasParams): void

Params

type AliasParams = {
  userId: string,           // The primary user ID.
  anotherUserId: string,    // The user ID to be merged with the primary ID.
}

Forbidden event names for use

Certain event names are reserved or forbidden to prevent conflicts or misidentification in the tracking system. They include common actions and default functionalities that are automatically tracked or handled differently:

  • auto-track: Reserved for automatic tracking mechanisms.
  • view page: Used specifically for page view tracking.
  • leave page: Indicates a user leaving a page, automatically tracked.
  • change on: Indicates a user leaving a page, automatically tracked.
  • click on: Indicates a user leaving a page, automatically tracked.
  • submit on: Used for tracking form submissions.
  • identify: Special use within the identify function itself.
  • consent: Special use within the identify function itself.

These names should not be used as custom event titles to avoid system errors and ensure accurate event categorization and analysis.