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:
Copy
{ click_id: "30aa8b8d-b846-4827-bd6f-6beb16466841", cookie_duration: 30, partner_id: "f468da94-f786-485c-9314-3008ce472188", program_id: "prg_YRsbPDAKhWAdqJbFACheh", customer_id: null // Will be set after signup}
When a visitor signs up, convert them to a lead using the signup function:
Copy
const result = await window.tolt.signup("user@example.com");// Returns signup data including customer_id
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.