Track signups with identify() in the browser

For single-page apps and custom flows: call identify() once the signup request succeeds.

Before you start

The Chartsy script must already be on every page of your site, including the app where signup happens - it supplies where the visitor came from; this guide only adds the email. See the installation guides.

For React, Vue, Svelte or any custom flow. This runs in the visitor's browser, where the Chartsy script reads its own cookies, so you only supply the email.

1Call identify() after signup succeeds

Once your signup request has succeeded - not on submit, and not on login.

const res = await fetch('/api/signup', { method: 'POST', body: form });
if (res.ok) {
  window.chartsy?.identify({ email });
}

2TypeScript: declare it once (optional)

declare global {
  interface Window { chartsy?: { identify(p: { email: string }): void } }
}

export {};

Related articles

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.