Signals Docs
Installation

Laravel

Composer package with a Blade directive and server-side event helpers.

Install

composer require signals/laravel
php artisan vendor:publish --tag=signals-config

Add to .env:

SIGNALS_KEY=sig_live_YOUR_KEY
SIGNALS_HOST=https://api.pixelfox.app
SIGNALS_SCRIPT_URL=https://api.pixelfox.app/signals.min.js
SIGNALS_AUTO_INJECT=false

Add the tag

Either place the Blade directive in your layout's <head>:

<head>
    ...
    @signalsTag
</head>

…or set SIGNALS_AUTO_INJECT=true and register the middleware to inject the tag into every HTML response automatically:

// bootstrap/app.php (Laravel 11+)
->withMiddleware(function (Middleware $middleware) {
    $middleware->web(append: [\PixelFox\Middleware\InjectSignalsTag::class]);
})

Server-side events

Fire conversion events from controllers, jobs or webhooks - immune to ad blockers, and carrying the customer email for high-quality ad-platform matching:

use PixelFox\Facades\PixelFox;

// Anywhere after checkout completes:
PixelFox::purchase(
    orderId: $order->id,
    total: $order->total,
    currency: 'USD',
    email: $order->customer_email,
);

// Or any custom event:
PixelFox::track('subscription_started', [
    'plan' => 'growth',
    'value' => 29,
    'currency' => 'USD',
]);

PixelFox::purchase() generates a fresh event_id (UUID). If you also fire a purchase event in the browser on the confirmation page, keep only one of the two.

Gotchas

  • The middleware only injects into text/html responses that contain </head>.
  • Calls are fire-and-forget with a 2-second timeout - a PixelFox outage never blocks a checkout. Failures are logged to your default log channel.

On this page