intelliada / laravel
First-party Intelliada analytics for Laravel: the tracking script and events are served from your own domain.
Requires
- php: ^8.2
- illuminate/console: ^11.0|^12.0|^13.0
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/routing: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- illuminate/view: ^11.0|^12.0|^13.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.8
- orchestra/testbench: ^9.0|^10.0|^11.0
- phpunit/phpunit: ^11.0|^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-12 10:20:51 UTC
README
Cookieless, first-party Intelliada analytics for Laravel.
The tracking script and its events are served from your own domain, under a path that's random to your app, so ad blockers have no third-party host or common pattern to block. Your project token stays on your server.
Installation
composer require intelliada/laravel php artisan intelliada:install --token=your-project-token
The install command:
- publishes
config/intelliada.php; - saves
INTELLIADA_TOKENand a randomINTELLIADA_PATHto.env; - adds
@intelliadato your layout's<head>, checkingresources/views/app.blade.php,layouts/app.blade.phpandcomponents/layouts/app.blade.php.
If your layout lives elsewhere, add the directive yourself:
<head> ... @intelliada </head>
What gets tracked
- A pageview for each page load.
- Client-side navigations in Inertia, Livewire
wire:navigate, Turbo and otherhistory.pushStaterouters, each with the previous page as its referrer so visits keep their original source. - Custom events from your JavaScript:
window.Intelliada?.trackEvent('Signup', { plan: 'pro' });
No cookies are set and nothing is stored beyond the browser session.
How it works
@intelliada renders a script tag pointing at /{path}/main.js on your domain. The script sends events to /{path}/e, and the package forwards them to Intelliada with your token, the visitor's IP address and user agent, and their country if your CDN provides one. The visitor's IP address is used only to compute a daily-rotating visitor hash and is never stored.
These routes sit outside the web middleware group, so they use no session or CSRF token, and they're rate-limited per visitor.
Configuration
| Variable | Default | Purpose |
|---|---|---|
INTELLIADA_TOKEN |
– | Your project token. Tracking is off until it's set. |
INTELLIADA_ENABLED |
true |
Set to false to switch tracking off for an environment, such as local. |
INTELLIADA_PATH |
ia |
The first-party path. Set by intelliada:install. |
INTELLIADA_TIMEOUT |
2 |
Seconds to wait when forwarding an event. |
The route middleware and the CDN country headers (CF-IPCountry, CloudFront-Viewer-Country, X-Vercel-IP-Country, X-Country-Code) can be changed in config/intelliada.php.
Behind a load balancer or CDN
Visitors are identified by $request->ip(), so make sure Laravel's trusted proxies are configured. Otherwise every visitor looks like your load balancer.
Testing
composer test
License
MIT. See LICENSE.