jeffersongoncalves/laravel-clarity
Laravel Clarity is a lightweight package that brings Microsoft Clarity analytics to your Laravel app. Publish the config, add the tracking snippet, and start capturing session recordings, heatmaps, and click data with almost no setup.
<script> now inherits Laravel's Vite CSP nonce, so nonce-based script-src policies work without 'unsafe-inline' — turns a common enterprise/regulated procurement objection into a supported configuration. This is an adoption enabler, not a nice-to-have.laravel-security-headers is fiddly, security-sensitive plumbing that must be re-validated on every Laravel/Vite upgrade. Paying for (or standardizing on) a package that owns this is cheaper than maintaining a bespoke wrapper plus CSP regression tests.laravel-security-headers on/off, hash- vs. nonce-based policies), and add automated tests that assert the nonce attribute is present when a nonce exists and absent (not empty/broken) when it doesn't.Adopt when:
script-src policy without 'unsafe-inline' — typically via Laravel's Vite nonce or laravel-security-headers.Look elsewhere or defer when:
integrity, async/defer, or dynamic client-side injection.For executives: Version 1.1.0 closes a security-review gap that has historically stalled deals with customers who enforce strict browser security policies. Scripts this package renders now automatically carry the app's security nonce, which means those customers can adopt us without weakening their policy with 'unsafe-inline'. It is a minor, backward-compatible upgrade — no migration cost — and it broadens the addressable market into enterprise and regulated accounts.
For engineering: The package now reads the framework's Vite CSP nonce and stamps it onto every <script> it renders, interoperating cleanly with laravel-security-headers. Upgrade is additive and low risk. Recommended follow-ups: add a regression test asserting nonce presence when configured and correct omission when not, document the supported CSP configurations, and smoke-test under a report-only policy before flipping to enforce.
How can I help you explore Laravel packages today?