Call tolt.signup() when someone creates an account, so Tolt records them as a lead and links them to the partner who referred them. From then on, every payment from that customer is credited to the same partner.
Before you start
The tracking script must be on your website and on the page where people sign up. See Add the tracking script to your site.
Record the sign-up
Go to Settings › Tracking script and copy the code under Track signups.
Run it right after a sign-up succeeds in your app, with the user's email:
const result = await window.tolt?.signup(user.email);
if (result?.customer_id) {
// Save it on your user. You'll need it to record payments.
}
The call never throws. For visitors without a referral, and for repeat sign-ups, it comes back without a customer_id, so there's nothing else to check.
Check that it works
Sign up once through a partner link, then go to Customers. The new customer appears at the top with the Lead status and the partner who referred them.
Good to know
Use the email the customer will pay with, so their payments match the lead.
If sign-up finishes as the page loads, such as after an OAuth redirect, wait for the
toltScriptLoadedevent whenwindow.toltisn't there yet.If you record payments with Tolt's API, send the saved
customer_idwith each payment. See Track payments with Tolt's API.A lead becomes Trial or Active once the customer starts a trial or pays. See Customer statuses.
For more ways to record sign-ups, including from your server, see Track signups in the developer docs.

