Identify customers
Tell Clakta who the visitor is with clakta.identify(), so their journey follows the person instead of the browser.
Clakta tracks anonymous visitors by default. When someone logs in or signs up on
your site, clakta.identify() tells Clakta who they are, so what they did
before and after logging in belongs to one customer.
This only works in full attribution projects, and it needs a developer to add it to your site.
How to use it
Call it as soon as you know who the visitor is, such as on login or signup:
You can call it right after init(). Clakta waits until it is ready and then
sends it.
Identifiers
You must send at least one of these, or the call is ignored:
| Field | Use it for |
|---|---|
externalId | The customer's id in your own system. The most reliable option. |
claktaCustomerId | A Clakta customer id you already have, such as cust_1234567890. |
email | The customer's email, when you have nothing more stable. |
You can also send name and phone (with country code, such as
+5511999999999). Anything else you send is saved as extra information:
Prefer externalId to email. People change their email, and the same
customer would then become two.
Where to call it
- On login: the most useful place. It links what the visitor did before logging in to the person.
- On signup: the moment a visitor becomes a customer.
- On any page where the user is logged in: calling it again is harmless.
Calling it again with the same identifier is safe, and updates the extra information you send.
Why nothing shows up
identify() does nothing in privacy-friendly projects, or when the visitor
refused consent. If you call it and the Users section stays empty, check the
project's tracking mode first. With debug: true, the browser console shows
Skipping identify (privacy_friendly mode or consent withheld). See
Tracking modes.
Never use an id taken from a link or a form nobody verified. Someone could send a stranger's id and mix their visits into a real customer's record.
Related articles
How Clakta tracking works
The path from an ad click to a sale in Clakta, step by step, and where to look when something is missing.
Tracking modes
Privacy-friendly or full attribution: what each mode collects, what it costs you, and what changes when you switch.
Track ecommerce events
Record product views, add to cart, checkout started and payment submitted from your site, to see where visitors give up before buying.