Skip to main content

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 the click_id.

Lead Tracking Parameters

  • click_id (str) - The unique click identifier
  • event_name (str) - Name of the lead event (e.g., “signup_started”, “email_verified”)
  • customer_external_id (str) - Your internal customer identifier
  • customer_name (str, optional) - Full name of the customer
  • customer_email (str, optional) - Customer’s email address
  • timestamp (str, optional) - ISO 8601 timestamp (auto-set if not provided)

Deferred Lead Tracking

Use deferred mode for two-step lead attribution when the click_id isn’t available at the event time.

Step 1: Initialize Deferred Lead Tracking

Step 2: Track Follow-up Events

Key Benefits:
  • Store click context for later reference
  • Track multiple user journey events without losing attribution
  • Simplify event tracking for complex workflows
Complete Deferred Example:

Sale Tracking

Track completed sales and revenue events with full transaction details.

Sale Tracking Parameters

  • click_id (str) (optional) - The unique click identifier
  • event_name (str) - Name of the sale event (e.g., “purchase_completed”, “payment_received”)
  • customer_external_id (str) - Your internal customer identifier
  • invoice_id (str) - Invoice or transaction identifier
  • amount (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 name
  • customer_email (str, optional) - Customer’s email
  • timestamp (str, optional) - ISO 8601 timestamp (auto-set if not provided)

Error Handling

Documentation

For complete documentation, visit Python SDK Docs