me-shaon/laravel-request-analytics
Privacy-first web analytics for Laravel: track real-time page views, visitors, bounce rate, sessions, and performance in a built-in dashboard. Includes bot filtering, geo/device insights, data retention controls, IP anonymization, and a REST API—no third-party sharing.
artisan commands, config publishing, and migrations).php artisan request-analytics:install) simplifies setup, reducing onboarding complexity. Manual setup is also available for customization.web and api groups) to capture requests without modifying core application logic. This minimizes risk of breaking existing functionality.default or custom) mitigates performance impact on high-traffic applications.request_analytics) and migrations. In monolithic applications, this could introduce schema conflicts or deployment complexity.queue.enabled = true).cache.ttl configuration).pruning.enabled to auto-clean old data).ipapi provider is free but rate-limited.skip_ips/skip_referrers is possible but may require tuning./analytics route introduces a new endpoint that must be secured (e.g., via middleware like auth or custom CanAccessAnalyticsDashboard).pruning.days) balance between analytics accuracy and database size? For high-traffic apps, consider tuning this or using a separate analytics database.queue.enabled, ensure the queue worker (php artisan queue:work) is monitored to avoid job backlogs.request-analytics.access middleware doesn’t conflict with existing auth or rate-limiting middleware.request_analytics table includes tenant identifiers or use Laravel’s globalScopes.vendor:publish --tag="request-analytics-views") be required?capture.web = false and capture.api = false to verify dashboard functionality without data collection.ignore-paths to exclude high-traffic or sensitive endpoints during testing.skip_ips to exclude internal/dev traffic.pruning.days based on retention needs.geolocation.provider based on accuracy/latency requirements.queue.enabled and monitor job processing times. Scale queue workers as needed.CanAccessAnalyticsDashboard to restrict access to authorized users (e.g., admins).skip_referrers) may need maintenance.request_analytics table.composer require me-shaon/laravel-request-analytics and php artisan request-analytics:install.php artisan tinker:
MeShaon\RequestAnalytics\Models\RequestAnalytics::latest()->take(5)->get();
/analytics) and API endpoints.capture.web = true).skip_ips, pruning.days).config/request-analytics.php simplify updates. Use environment variables for sensitive values (e.g., REQUEST_ANALYTICS_GEO_API_KEY).skip_ips, ignore-paths) for future maintainers.composer.json to avoid unexpected updates:
"me-shaon/laravel-request-analytics": "^1.0"
app/Http/Kernel.php and routes are not excluded via ignore-paths.failed_jobs table and queue worker logs.'debug' => env('REQUEST_ANALYTICS_DEBUG', false),
request-analytics:clear command for data cleanup.request_analytics table by date.cache.ttl) to reduce database load for frequently accessed metrics.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Database connection issues | Data loss or incomplete analytics. | Use Laravel’s |
How can I help you explore Laravel packages today?