spatie/laravel-googletagmanager
Laravel package for easy Google Tag Manager integration. Manage the JavaScript dataLayer from PHP, push variables and events, and include GTM scripts cleanly in your app with simple configuration and helpers.
Add Laravel 13 support
nonceEnabled configuration option (#63)When using this package with spatie/laravel-csp, you can now enable CSP nonces on injected script tags:
// config/googletagmanager.php
'nonceEnabled' => env('GOOGLE_TAG_MANAGER_NONCE_ENABLED', true),
This uses Laravel's Vite::cspNonce() to inject the nonce attribute on all script tags.
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.8.1...3.0.0
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.8.0...2.8.1
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.7.1...2.8.0
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.7.0...2.7.1
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.7...2.7.0
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.6...2.6.7
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.5...2.6.6
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.4...2.6.5
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.3...2.6.4
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.2...2.6.3
Fix old array helper syntax
setIdSeparate the script to head and body sections
push supportThis is now a Laravel 5 specific package. For the Laravel 4 implementation, check out https://github.com/spatie/laravel4-googletagmanager/
Changed: If GoogleTagManager is disabled, ApiKeyNotSetException won't throw
Minor bugfixes & internal refactoring
How can I help you explore Laravel packages today?