> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: 394cde1e-3b8d-4ba8-b98f-69ec2720f3f8
---

# Identify a visitor

Identify a visitor by email address. This links the visitor's `usertoken` to their email address, allowing HubSpot to update an existing contact record or create a new one.

<Warning>
  You should only use the `identify` method when you know the identity (i.e. the email address) of the person viewing the page. Using a placeholder email for unknown visitors will create a contact record with that placeholder email.
</Warning>

## Usage

```javascript theme={null}
var _hsq = (window._hsq = window._hsq || []);
_hsq.push([
  "identify",
  {
    email: "visitor@example.com",
    firstname: "John",
    lastname: "Doe",
  },
]);
```

## Notes

* The `identify` function only sets the identities in the tracker.
* The identities do not get passed to HubSpot until you make a separate `trackPageView` or `trackCustomBehavioralEvent` call.
* HubSpot validates the email address used for any process that would create or update a contact record.
