acme.com/?ref=samclick tolt.jssignup(email) Tolt
Saved as cookies
tolt_data30 days
click_id
partner_id
program_id
customer_idnull
Returned by signup()
result
customer_id
partner_id
click_id
program_id
Install
<head> as you can. Your public key is in Dashboard → Settings → Integrations; it is safe to ship to the browser. For framework setups, see Install the script.
Script attributes
With
data-stripe-type, tolt.js adds the click id to Stripe elements on the page, and keeps it there as the DOM changes:
payment_links: appendsclient_reference_id=<click_id>to links pointing at Stripe.pricing_table: setsclient-reference-idon<stripe-pricing-table>.buy_button: setsclient-reference-idon<stripe-buy-button>.
The window.tolt API
Bind the signup
Callsignup() after your own signup succeeds. It waits for the click to be recorded, and ?. skips it if an ad blocker stopped the script. If your signup completes as the page loads, for example on an OAuth callback, check window.tolt first and wait for the toltScriptLoaded event if it isn’t there yet.
result.customer_id, cus_...), not that identifier.
A successful result carries the new customer (plus a message):
ToltData
getTracking() returns null when the visit did not come from a partner link. Otherwise every field can still be null until it is known.
string | null
The recorded click. Send it to
POST /v2/customers, together with partner_id, if you bind customers from your server.string | null
The partner whose link was followed.
string | null
The program the link belongs to.
number | null
Days the referral is remembered (your program’s cookie window).
string | null
Set after a successful
signup(), so you can skip binding twice.Tracked URL params
tolt.js reads the first of these it finds in the query string (or the hash):tolt ref aff via lmref fpr tap_s afmc f2f-ref join ali
The value must match a partner link in your program, e.g. acme.com/?ref=sam or acme.com/pricing?via=sam.
Cookies
Both last for the program’s cookie window (30 days if unset), on the domain described above. On HTTPS they are set
Secure; SameSite=None.
Legacy globals
Older integrations can keep readingwindow.tolt_referral (click id) and window.tolt_data (ToltData). The script also fires a toltScriptLoaded event on window and document when it is ready; prefer await tolt.ready() in new code.
