Guides / How To
Track with tolt.js
Track partner clicks, leads, and payments using the tolt.js script
Installation
First, add the tolt.js script to the head of your website/app:
Tracking Flow
1. Click Tracking
The tolt.js script automatically tracks visitors that come through partner links:
- When a visitor arrives through a partner link, tolt.js creates a click
- The click data is accessible through
window.tolt_data
:
2. Lead Tracking
When a visitor signs up, convert them to a lead using the signup function:
After signup, store the customer_id
and partner_id
from window.tolt_data
in your database. You’ll need these to track future payments for this customer.
3. Payment Tracking
When the customer makes a payment, call the create a transaction API:
When a transaction is created, Tolt automatically:
- Identifies the associated partner through the customer_id
- Triggers the programs commission flows
- The flows will create a commission record for the partner if the conditions are met
This completes the tracking cycle from initial click through to paid commission.