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.

No backend step

Runs in the visitor’s browser. You only supply the email.

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:

CookieHoldsUsed for
chartsy_attribFirst source this visitor ever came from (JSON, URL-encoded)First-touch attribution
chartsy_attrib_lastMost recent source (JSON, URL-encoded)Last-touch attribution, the default report
chartsy_visitor_idPlain visitor idMatching 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 flowGuideCounts only real signups?
You own a backend (any language)Identify API or your framework's guideYes
Supabase, Clerk or Firebase Authidentify() in the browser, once your app knows the account is newYes, if you check the account was just created
Single-page app, no backend step you can hookidentify() in the browserYes, if called after success
A plain HTML <form>data-chartsy-signup attributeNo - 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
Chartsy Team

Written by

Chartsy Team

Analytics team at Chartsy

The Chartsy Team writes guides, product updates, and resources to help SaaS and eCommerce founders make sense of their metrics, without SQL or spreadsheets.

Chartsy
Ministry of Economy and Innovation
Startup Albania

The Chartsy program is realized with the financial support of the Albanian Government through the Ministry of Economy and Innovation, under the Grant 2026 scheme, and is implemented by the Innovation4Albania Agency.