Track signups
The script knows where each visitor came from. If people sign up with an email and a password, it recognises the signup form by itself and there is nothing to add. The guides below cover everything else - pick your stack, you only need one.
Automatic: signup forms need no code#
When a visitor submits a form with an email and a password field, and the form is a signup rather than a login - a button like Sign up, Create account or Start free trial, a confirm-password field, or a password field marked autocomplete="new-password" - the script reports the email as a signup. Login, password-reset and password-change forms are skipped, and forms without a password field (newsletters, contact forms) never count. Growth → Set up tracking lists the pages where it found your form.
It works with ordinary forms and with React, Vue or Svelte forms that still submit a <form>.
Clerk, Supabase and Firebase sign-ups are picked up too, including "Continue with Google" and magic links: when the page shows a signed-in user whose account was created in the last few minutes, that is a new signup; returning users signing in are ignored. Supabase and Firebase keep the sign-in in browser storage, which Chartsy reads only when it may use cookies, so on a Cookieless site, or before a visitor accepts your cookie banner, those two need identify(). With any other auth, signups without a password field need one of the guides below.
A form submission your site rejects, such as an email that is already registered, can still count. Once your server reports signups through the Identify API, Chartsy stops using the forms it detects and uses those instead. Clerk, Supabase and Firebase sign-ups are real accounts, so they keep counting either way; Chartsy keeps one signup per email.
To skip one form, add data-chartsy-ignore to it. To turn detection off, add data-auto-signups="off" to the Chartsy script tag.
Backend frameworks
Send the signup from your server, the moment the account is created.
Reference
The API every server-side guide uses, and what to check when numbers look off.
Before you start#
The Chartsy script must be on every page, including the app where signup happens - see the installation guides. Your site has two keys: the public key (ch_pk_...) in the script tag, and a secret key that only server-side guides use. Keep the secret key in an environment variable, never in browser code or git.
The script writes three first-party cookies that the server-side guides read back:
| Cookie | Holds | Used for |
|---|---|---|
chartsy_attrib | First source this visitor ever came from (JSON, URL-encoded) | First-touch attribution |
chartsy_attrib_last | Most recent source (JSON, URL-encoded) | Last-touch attribution, the default report |
chartsy_visitor_id | Plain visitor id | Matching the signup to a paying customer |
The cookies are set on your root domain, so a visitor who lands on example.com and signs up on app.example.com keeps them.
Not sure which guide?#
Pick the first row that fits your signup flow. Routes higher up count only accounts that were really created.
| Your signup flow | Guide | Counts only real signups? |
|---|---|---|
| A signup form with an email and a password | Nothing to add: detected automatically | No - rejected submits also count, until your server reports signups |
| You own a backend (any language) | Identify API or your framework's guide | Yes |
| Supabase, Clerk or Firebase Auth | Nothing to add: detected automatically. Cookieless with Supabase or Firebase: identify() in the browser | Yes - only accounts created minutes ago count |
| Single-page app, no backend step you can hook | identify() in the browser | Yes, if called after success |
| A plain HTML <form> | data-chartsy-signup attribute | No - failed or duplicate submits also count |
Whichever you choose, Chartsy keeps the first signup per email and ignores repeats, so calling it again on a later login does not create a second signup. It does, however, count an existing user as new the first time they are seen - which is why every login-based guide checks that the account was just created.
Next: attribute revenue#
Chartsy links each payment to its signup by email. Adding the visitor id at checkout keeps the match when someone pays with a different email.
Revenue attribution guides

