Skip to main content

Installation

Requirements: PHP 8.2+, Laravel 10+

Configuration

Add your credentials to .env:

Service Provider

The package auto-discovers GetImmutable\GetImmutableServiceProvider. No manual registration needed.

Facade

Tracking Events

Basic Usage

Fluent Builder

PendingEvent Methods

Batch Ingestion

Querying Events

Retrieving a Single Event

Verification

Viewer Tokens

Alerts

Exports

Anchors

Auto-Session Tracking

The Laravel SDK can automatically attach the current Laravel session ID to every tracked event. Enable this in your configuration:

Eloquent Observer Example

Track model events automatically using an Eloquent observer:
Register the observer in your AppServiceProvider:

Queue Integration

Set GETIMMUTABLE_ASYNC=true in your .env to dispatch tracking calls via Laravel’s queue system instead of making synchronous HTTP requests. This prevents audit logging from blocking your application’s response time.
Ensure your queue worker is running to process the dispatched jobs.