jeffersongoncalves/laravel-gtag
Laravel package for integrating Google tag (gtag.js) and Google Analytics 4 into your application, with simple configuration, Blade support, and helpers for tracking page views and custom events.
'unsafe-inline' for this package's inline scripts can now use a nonce-based policy, which is the difference between "CSP deployed on paper" and "CSP that satisfies a pen test, SOC 2 reviewer, or enterprise security questionnaire."Adopt when:
laravel-security-headers 2.1+ with Vite::cspNonce(). The value here is entirely dependent on a nonce actually being set; the two are a package deal and should be evaluated together.'unsafe-inline' — anything customer-facing with an external security review.Look elsewhere (or defer) when:
Vite::cspNonce() — verify the integration point or you'll buy the feature and not get the benefit.To executives: A small upgrade that unlocks a meaningful security posture improvement — we can enforce a strict Content-Security-Policy without weakening it with 'unsafe-inline'. That's a recurring finding in customer security reviews and a common procurement gate; closing it reduces sales friction and audit exposure at essentially zero product risk, since behavior is unchanged for apps that don't set a nonce.
To engineering: v3.1.0 propagates the CSP nonce (Vite::cspNonce()) onto the scripts this package emits, so a nonce-based policy validates them without an inline-script exemption. No migration, no behavior change when no nonce is present. The only real work is confirming our nonce source feeds Vite::cspNonce() — if it does, this is a version bump plus a CSP header change, and we can ship the bump well before the policy tightening.
How can I help you explore Laravel packages today?