Track signups
The script knows where each visitor came from. These guides add the one thing it can't see: who signed up. Pick your stack - you only need one guide.
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? |
|---|---|---|
| You own a backend (any language) | Identify API or your framework's guide | Yes |
| Supabase, Clerk or Firebase Auth | identify() in the browser, once your app knows the account is new | Yes, if you check the account was just created |
| 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

