Skip to main content

Identification methods

Methods to manage contact sessions and identification.

UE.pageHit(data)​

Updates the current session and identifies the contact. Used for page navigation in SPAs or form submissions.

Example 1: Identifying a contact (e.g. Form Submission)

UE.pageHit({
email: "user@example.com",
first_name: "John",
event: {
event_name: "form_submitted",
form_id: "newsletter_footer"
}
});

Example 2: Tracking a route change (SPA Navigation) In Single Page Applications, call this without arguments on route change to track a "Page Visit".

// Call after route change
UE.pageHit();

Parameters:

  • data (Object, optional): Contact attributes and optional event data. If omitted, tracks a standard page view with current URL/Title.

UE.resetAuth(data)​

Clears the current session or switches to a different contact.

UE.resetAuth({
email: "new.user@example.com"
});

Parameters:

  • data (Object, optional): New contact data to identify with. If omitted, resets to anonymous.

userengage('client.update', data)​

Updates contact attributes without switching the tracking session.

userengage('client.update', {
first_name: "Jane",
newsletter_opt_in: true
});

Parameters:

  • data (Object): Key-value pairs of attributes to update.

For comprehensive contact identification strategies, see Contact identification. For attribute updates, see Updating contact attributes.