Identify visitors in code (HTML / JavaScript)
Tell FunnelTrack who a visitor is the moment you know, such as at login or an email opt-in, without sending a conversion. Their hashed contact info is attached to the session, so later events and offline conversions match back to them.
What Identify does
| Identify | |
|---|---|
| Sends a conversion to ad platforms | No. Nothing is dispatched and it doesn't count toward your event usage. |
| What it sends | Contact info only: email, phone, first name, last name, city, region, zip, country. |
| Privacy | Every field is hashed with SHA-256 in the browser. Raw values never leave the page. |
| Why use it | Binds the visitor to a contact, so their later events carry stronger match data and offline conversions (CRM stages, closed deals) can be matched back to their web session. |
1. Identify when you learn who the visitor is
Call window.ft.identify() at login, sign-up, or opt-in.
Call identify()
Pass whichever contact fields you have. Email and phone give the strongest match.
window.ft.identify({
email: "jane@example.com",
phone: "+15555550123",
first_name: "Jane",
last_name: "Doe"
// city, region, zip, country also accepted
});Example: identify on form submit
<script>
document.querySelector("#newsletter-form").addEventListener("submit", function (e) {
var emailEl = e.target.querySelector('input[type="email"]');
if (emailEl && emailEl.value) {
window.ft.identify({ email: emailEl.value });
}
});
</script>The pixel snippet queues identify() calls made before it finishes loading, so you can call it any time after the snippet.
2. Identify on page load (logged-in visitors)
Bind contact info to the very first hit, before any interaction.
If your page already knows the visitor, set their contact fields on window.__ft_upd before the pixel snippet. The pixel hashes them in the browser and attaches them to the automatic page view, so the contact is bound on the first hit.
<script>
window.__ft_upd = {
email: "jane@example.com",
first_name: "Jane"
};
</script>
<!-- FunnelTrack Pixel snippet from your dashboard goes here -->Render the values server-side from the logged-in user. Leave the block out for visitors you don't know.
window.crypto.subtle, which only works over HTTPS (or localhost). On plain http:// pages the Identify call is skipped.window.ft.event() instead. See Send pixel events directly.