User Identification

User Identification

Connect events to specific users to track individual journeys and build user profiles. Identifying users helps Overcentric automatically surface most important users to focus on, eg. recent signups, users at risk of churn, highly active users, etc.

Identifying Users

Call identify when a user logs in or signs up:

overcentric.identify("user_123", {
  name: "John Doe",
  email: "john@example.com"
});

After calling identify, all subsequent events are associated with this user.

What Happens When You Identify

When you identify a user, Overcentric automatically:

  1. Links the device to the user: All past anonymous events from this device are connected to the user
  2. Maintains a device ID: Tracks the user across sessions on the same device
  3. Preserves attribution: The original referrer and UTM parameters stay attached to the user
  4. Enables cross-device tracking: If the user logs in on another device, events are linked

User Properties

The second argument accepts user properties:

overcentric.identify("user_123", {
  name: "John Doe",
  email: "john@example.com",
  plan: "pro",
  company: "Acme Inc",
  created_at: "2024-01-15"
});

Properties are optional but help with:

  • Segmenting users in analytics
  • Personalizing support interactions
  • Building user profiles

When to Call Identify

Call identify at these moments:

Moment Why
After login Connect the session to the authenticated user
After signup Link the new user to their pre-signup activity
On page load (if logged in) Ensure all events are attributed correctly

Example: After Login

async function handleLogin(email, password) {
  const user = await api.login(email, password);
  
  overcentric.identify(user.id, {
    name: user.name,
    email: user.email,
    plan: user.plan
  });
}

Example: On App Load

// Check if user is already logged in
const user = getCurrentUser();

if (user) {
  overcentric.identify(user.id, {
    name: user.name,
    email: user.email
  });
}

Anonymous Users

Before identify is called, Overcentric tracks users anonymously using a device ID. This ID persists across sessions, allowing you to:

  • Track the full journey from first visit to signup
  • Attribute conversions to their original source
  • Understand pre-signup behavior

Accessing Device and Session IDs

For server-side tracking or debugging, you can access the current IDs:

const deviceId = window.overcentricDeviceId;
const sessionId = window.overcentricSessionId;

Next Steps