Installation
Install via Composer:Requirements
- PHP 7.4 or higher
- Composer for dependency management
- cURL extension enabled
Quick Start
Non-Deferred Lead Tracking
Track lead events when you have all the required information available immediately, including theclickId.
Lead Payload Methods
setClickId(string $clickId)- The unique click identifiersetEventName(string $eventName)- Name of the lead event (e.g., “signup”, “email_verified”)setCustomerExternalId(string $id)- Your internal customer identifiersetCustomerName(string $name)- Full name of the customersetCustomerEmail(string $email)- Customer’s email addresssetCustomerAvatar(string $url)- URL to customer’s avatar/profile picturesetTimestamp(string $timestamp)- ISO 8601 timestamp (auto-set if not provided)
Deferred Lead Tracking
Use deferred mode for two-step lead attribution when theclickId isn’t available at the time of the initial event.
Step 1: Store the clickId Association
Step 2: Track Using Only customerExternalId
- Store click context for later use
- Track multiple events in a user journey without losing click attribution
- No need to maintain clickId across complex workflows
Sale Tracking
Track completed sales and revenue events with full transaction details.Sale Payload Methods
setClickId(string $clickId)- The unique click identifiersetEventName(string $eventName)- Name of the sale event (e.g., “purchase”, “purchase_completed”)setCustomerExternalId(string $id)- Your internal customer identifiersetInvoiceId(string $invoiceId)- Invoice or transaction identifiersetAmount(float $amount)- Amount in cents (e.g., 4999 = $49.99)setCurrency(string $currency)- 3-letter currency code (e.g., “USD”, “EUR”, “INR”)setCustomerName(string $name)- Customer’s namesetCustomerEmail(string $email)- Customer’s emailsetCustomerAvatar(string $url)- URL to customer’s avatarsetTimestamp(string $timestamp)- ISO 8601 timestamp (auto-set if not provided)