Search documentation

Search titles, headings, and page summaries.

Identify users

Link signed-in activity to a stable user ID or email without losing anonymous context.

Call identify after your application knows who the visitor is, including when an authenticated app loads again.

Identify after sign-in

JavaScript
window.graytower("identify", { userId: user.id, email: user.email });

Either userId or email is required. Prefer an immutable application user ID: an email address can change or be reused. Use the same ID as graytower_user_id in Stripe metadata when you can. Identification helps Graytower connect browser activity and payments; it does not create a pageview or use the tracked-event allowance.

Reset when the account changes

Before a different person uses the same browser session, call window.graytower("reset"). This starts a new anonymous visitor identity. Do not put reset immediately after every identify call.

Avoid sending passwords, payment details, or other sensitive data in IDs or custom event parameters.