Download the PHP package jeffersongoncalves/laravel-simple-analytics without Composer
On this page you can find all versions of the php package jeffersongoncalves/laravel-simple-analytics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jeffersongoncalves/laravel-simple-analytics
More information about jeffersongoncalves/laravel-simple-analytics
Files in jeffersongoncalves/laravel-simple-analytics
Package laravel-simple-analytics
Short Description Simple Analytics for Laravel: inject the tracking script in your Blade layouts, with the settings stored in the database via spatie/laravel-settings.
License MIT
Homepage https://github.com/jeffersongoncalves/laravel-simple-analytics
Informations about the package laravel-simple-analytics
Laravel Simple Analytics
Add Simple Analytics — privacy-first, GDPR-compliant analytics without cookies — to your Laravel app. The settings are stored in the database with spatie/laravel-settings, so you can change them at runtime (e.g. from an admin panel) instead of in .env.
For a Filament settings page, use jeffersongoncalves/filament-simple-analytics.
Installation
Publish and run the settings migration:
Configuration
Or through the settings class or the Facade:
Available settings
| Setting | Type | Default | Description |
|---|---|---|---|
enabled |
bool |
false |
Load the Simple Analytics script. No ID needed: visits are matched by domain. |
hostname |
?string |
null |
Optional domain to report the visits under (data-hostname). |
Usage
Add the script to your Blade layout, inside <head>:
Nothing is rendered until the settings are complete, so you can ship the include everywhere and turn Simple Analytics on later.
Content Security Policy
When your app sets a CSP nonce through Laravel's Vite (Vite::useCspNonce(), as laravel-security-headers does), every <script> this package renders carries it, so a script-src 'self' 'nonce-{nonce}' policy works without 'unsafe-inline'. Scripts loaded afterwards from the vendor's own CDN still need that host in script-src (and its API in connect-src).
Testing
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
- Jefferson Gonçalves
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-simple-analytics with dependencies
laravel/framework Version ^12.61.1|^13.12.0
spatie/laravel-package-tools Version ^1.14.0
spatie/laravel-settings Version ^3.0