Identify your logged-in users

Name your visitors, build contact profiles, and keep identities spoof-proof with signed hashes.

C
ChatteringJuly 29, 2026

Out of the box, chat visitors are anonymous — the inbox shows them as "Visitor 4821". One script call changes that: tell the widget who's logged in, and every conversation arrives with a real name, linked to a contact profile with their plan, value and activity.

Identify a logged-in user

Call identify once your user is signed in (any page the widget runs on):

window.Chattering = window.Chattering || { _q: [] };
["identify","updateContact","clearIdentity","track","open","close","toggle"].forEach(function (m) {
  window.Chattering[m] = window.Chattering[m] || function () { window.Chattering._q.push([m, [].slice.call(arguments)]); };
});

Chattering.identify("42", {
  email: "ada@example.com",
  name: "Ada Lovelace",
  plan: "pro",
  value: 119,
  companyName: "Example Inc"
});

The first argument is your user id — the same person keeps one profile across devices and conversations. Everything else is optional: email, name, phone, plan, value (their monthly worth to you), companyName, avatarUrl, and a customData object for anything else.

What you get

  • Inbox conversations show the person's real name instead of a visitor number.
  • Every identified person appears under Contacts → People, with a profile: their details, custom data, conversations, and a timeline of what they did.
  • Chattering.track("upgraded_plan", { to: "pro" }) adds product events to that timeline.
  • Page views are recorded automatically for identified users, and every conversation shows the last pages the visitor saw before asking — identified or not.

Keep identities spoof-proof (recommended)

Anyone can call identify from a browser console, so for real security turn on Require signed identities in your agent's Deploy tab. Create a verification secret there, then compute a signature on your server and pass it as the third argument:

// Node.js, on your server — never in the browser:
const crypto = require("crypto");
const userHash = crypto.createHmac("sha256", process.env.CHATTERING_IDENTITY_SECRET)
  .update(String(user.id)).digest("hex");
Chattering.identify(String(user.id), { email: user.email, name: user.name }, userHash);

With enforcement on, an identify without a valid signature is treated as anonymous — it is never mapped onto someone else. Verified profiles show a "Verified" mark in Contacts.

Log out

Call Chattering.clearIdentity() when the user signs out. The widget forgets the person and the conversation, so the next visitor on that browser starts fresh and anonymous.

Import existing customers

You can also bring contacts in without any code: Contacts → People → Import CSV. The file needs an email column; name, externalId, phone, plan, company and value columns are picked up when present. When those people later identify through the widget, they merge onto the same profile instead of duplicating.

Need more help? Browse all articles or ask the assistant in the chat — it answers from these docs and can connect you with the team.

Was this helpful?

Related articles

Identify your logged-in users | Chattering Help Center | Chattering.ai