ranetrace / ranetrace-laravel
This package provides the integration for Ranetrace, a tool for monitoring your Laravel applications.
Requires
- php: ^8.4
- illuminate/support: ^11.0||^12.0||^13.0
- jaybizzle/crawler-detect: ^1.3
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/boost: ^2.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
Suggests
- laravel/mcp: Required for MCP server functionality (^0.5)
- dev-main
- v1.0.25
- v1.0.24
- v1.0.23
- v1.0.22
- v1.0.21
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0
- v0.1.5
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1
- dev-feature-mcp
- dev-feature-javascript-errors
- dev-feature-config-monitor
- dev-feature/test-command-ping
This package is auto-updated.
Last update: 2026-03-19 11:04:26 UTC
README
Ranetrace is an all-in-one tool for Error Tracking, Website Analytics, and Website Monitoring for Laravel applications.
- Alerts you about errors and provides the context you need to fix them
- Privacy-first, fully server-side website analytics — no cookies, no fingerprinting, no intrusive scripts
- Monitors uptime, performance, SSL certificates, domain and DNS status, Lighthouse scores, and broken links
Check out the Ranetrace website for more information.
Installation
Install the package via Composer:
composer require ranetrace/ranetrace-laravel
Add your Ranetrace key to .env:
RANETRACE_KEY=your-key-here
Optionally publish the config file:
php artisan vendor:publish --tag="ranetrace-laravel-config"
Usage
Error Tracking
Error tracking is enabled by default. Once installed, unhandled exceptions are automatically reported to your Ranetrace dashboard.
JavaScript Error Tracking
- Enable it in your
.env:
RANETRACE_JAVASCRIPT_ERRORS_ENABLED=true
- Add the Blade directive to your layout:
<body> @yield('content') @ranetraceErrorTracking </body>
You can also capture errors manually:
window.Ranetrace.captureError(error, { payment_amount: amount });
Event Tracking
Track custom events with a privacy-first approach — no IP addresses are stored, user agents are hashed, and session IDs rotate daily.
use Ranetrace\Laravel\Facades\Ranetrace; Ranetrace::trackEvent('button_clicked', [ 'button_id' => 'header-cta', 'page' => 'homepage' ]);
E-commerce helpers are available via the RanetraceEvents facade:
use Ranetrace\Laravel\Facades\RanetraceEvents; RanetraceEvents::sale( orderId: 'ORDER-456', totalAmount: 89.97, products: [['id' => 'PROD-123', 'name' => 'Widget', 'price' => 29.99, 'quantity' => 3]], currency: 'USD' );
Test your setup with:
php artisan ranetrace:test-events
Centralized Logging
Send your application logs to Ranetrace by adding the driver to config/logging.php:
'channels' => [ 'ranetrace' => [ 'driver' => 'ranetrace', 'level' => 'error', ], 'production' => [ 'driver' => 'stack', 'channels' => array_merge(explode(',', env('LOG_STACK', 'single')), ['ranetrace']), 'ignore_exceptions' => false, ], ],
Then enable it in your .env:
LOG_CHANNEL=production RANETRACE_LOGGING_ENABLED=true
Test your setup with:
php artisan ranetrace:test-logging
Website Analytics
Refer to the Ranetrace website for setup instructions.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.