Skip to main content
The biqli/sdk package supports PHP 8.1 or newer and uses a secret workspace API key.

Install

Add the key to your server environment:
The browser SDK writes bq_id as a plain attribution cookie. Laravel must leave only this cookie unencrypted so that incoming requests can read it. For Laravel 11 and newer, update bootstrap/app.php:
For Laravel 10, add bq_id to the $except array in App\Http\Middleware\EncryptCookies. This cookie contains an attribution identifier, not a secret. Do not exempt your authentication or session cookies.

Create a reusable client

In Laravel, bind this client as a singleton in a service provider rather than creating it for every event.

Track a lead

Track a sale

Handle errors

Do not log the API key or the entire unfiltered payload. The SDK retries bounded temporary failures. Stable event and invoice identifiers make retries safe across workers and deployments. See the complete PHP SDK reference.