Identifying users
One identify call after signup or login links a visitor to their email — and to the ad that earned them. Why Attributely uses explicit identity instead of scraping forms.
Email is what links a paying customer back to the ad that earned them. Without it, revenue can't be attributed. You provide it with one call, after signup or login — the moment a visitor is no longer anonymous:
window.ar('identify', {
email: user.email, // ties them to their payment
user_id: user.id, // optional, sharpens matching
});
That's the only identity code you write. Call it once and you're done; calling it again on every login is also fine — repeat identifies with the same email are harmless.
The call is safe to place anywhere, including pages where the pixel may not have finished loading. The window.ar('identify', ...) form queues until the pixel is ready, so it never races your page.
Why we don't auto-capture emails from forms
Most attribution pixels watch every form on your site and grab anything that looks like an email. We deliberately don't, for three reasons:
Scraped emails are often the wrong person's. A team-invite form, a "refer a colleague" field, a support form filled out on someone's behalf — a blind scrape links that email to this visitor, and now revenue from the wrong customer is credited to the wrong ad. Bad identity data doesn't just miss; it actively corrupts your numbers.
Scraping breaks silently. Custom form components, validation libraries, and multi-step signups all defeat field-watching in ways nobody notices. You find out months later that attribution stopped working in March.
It reads things users never submitted. Watching keystrokes in form fields means capturing emails people typed and then deleted. We don't want that data, and you don't want us holding it.
One explicit call costs you a minute and removes the entire class of problem: you know exactly what's captured, when, and from whom.
HubSpot forms identify automatically
There's one exception, because it doesn't involve scraping: HubSpot forms announce submissions through HubSpot's own documented form events. If you embed HubSpot forms, the pixel listens for that event and identifies the visitor with the submitted email — zero code, using the supported API.
If one of your HubSpot forms collects someone else's email (a team-invite form, for example), exclude it by adding its form GUID to the snippet:
script.js?uid=YOUR_SITE_ID&domains=yourdomain.com&hs_ignore=FORM_GUID
Multiple GUIDs are comma-separated.
Multiple logins on one browser: reset
This is optional. If each customer uses their own browser — the normal case — skip this section.
If your users share machines or switch between accounts, call reset on logout:
window.ar('reset');
It rotates the visitor token instantly, in the browser. Everything after the reset belongs to a fresh anonymous visitor, so when a second person logs in on the same machine, they're never merged into the first. The first user's history is untouched.