Track a lead for a short link.
PHP
declare(strict_types=1); require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; $sdk = Dub\Dub::builder() ->setSecurity( 'DUB_API_KEY' ) ->build(); $request = new Operations\TrackLeadRequestBody( clickId: '<id>', eventName: 'Sign up', customerExternalId: '<id>', ); $response = $sdk->track->lead( request: $request ); if ($response->object !== null) { // handle response }
{ "click": { "id": "<string>" }, "customer": { "name": "<string>", "email": "<string>", "avatar": "<string>", "externalId": "<string>" } }
Default authentication mechanism
A lead was tracked.
The response is of type object.
object
Was this page helpful?