Skip to main content

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

Lead Payload Methods

  • setClickId(string $clickId) - The unique click identifier
  • setEventName(string $eventName) - Name of the lead event (e.g., “signup”, “email_verified”)
  • setCustomerExternalId(string $id) - Your internal customer identifier
  • setCustomerName(string $name) - Full name of the customer
  • setCustomerEmail(string $email) - Customer’s email address
  • setTimestamp(string $timestamp) - ISO 8601 timestamp (auto-set if not provided)

Deferred Lead Tracking

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

Step 1: Store the clickId Association

Step 2: Track Using Only customerExternalId

Key Benefits:
  • 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)(optional) - The unique click identifier
  • setEventName(string $eventName) - Name of the sale event (e.g., “purchase”, “purchase_completed”)
  • setCustomerExternalId(string $id) - Your internal customer identifier
  • setInvoiceId(string $invoiceId) - Invoice or transaction identifier
  • setAmount(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 name
  • setCustomerEmail(string $email) - Customer’s email
  • setTimestamp(string $timestamp) - ISO 8601 timestamp (auto-set if not provided)

Error Handling

Configuration

Documentation

For complete documentation, visit PHP SDK Docs