Installation
Install via pip:Requirements
- Python 3.8 or higher
- requests library (installed as dependency)
Quick Start
Non-Deferred Lead Tracking
Track lead events with complete information including theclick_id.
Lead Tracking Parameters
click_id(str) - The unique click identifierevent_name(str) - Name of the lead event (e.g., “signup_started”, “email_verified”)customer_external_id(str) - Your internal customer identifiercustomer_name(str, optional) - Full name of the customercustomer_email(str, optional) - Customer’s email addresscustomer_avatar(str, optional) - URL to customer’s avatar/profile picturetimestamp(str, optional) - ISO 8601 timestamp (auto-set if not provided)
Deferred Lead Tracking
Use deferred mode for two-step lead attribution when theclick_id isn’t available at the event time.
Step 1: Initialize Deferred Lead Tracking
Step 2: Track Follow-up Events
- Store click context for later reference
- Track multiple user journey events without losing attribution
- Simplify event tracking for complex workflows
Sale Tracking
Track completed sales and revenue events with full transaction details.Sale Tracking Parameters
click_id(str) - The unique click identifierevent_name(str) - Name of the sale event (e.g., “purchase_completed”, “payment_received”)customer_external_id(str) - Your internal customer identifierinvoice_id(str) - Invoice or transaction identifieramount(int) - Amount in cents (e.g., 4999 = $49.99)currency(str) - 3-letter currency code (e.g., “USD”, “EUR”, “INR”)customer_name(str, optional) - Customer’s namecustomer_email(str, optional) - Customer’s emailcustomer_avatar(str, optional) - URL to customer’s avatartimestamp(str, optional) - ISO 8601 timestamp (auto-set if not provided)