NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #2434 most downloaded on Packagist
Google Tag Manager integration for Laravel
Last release 7 months ago
21 Feb 2026
Release timing varies
gaps range from 3 weeks to 2.2 years
Most releases are documented
notes for 23 of 32 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
32 releases · first in 2015
Add Laravel 13 support
Add Laravel 13 support
Add CSP nonce support for script tags via nonceEnabled configuration option
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.
One column per quarter.
Update issue template by @AlexVanderbist in #59
Full Changelog: 2.8.1...3.0.0
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.8.1...3.0.0
Add support for Laravel Octane by using the "scoped" method if it exists by @bram-pkg in #57
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.8.0...2.8.1
Flashing push data by @jmsfwk in #55
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.7.1...2.8.0
Set data-layer values before initialization by @mithredate in #52
Full Changelog: 2.7.0...2.7.1
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.7.0...2.7.1
Allow setting custom domains for serving gtm.js by @mithredate in #51
Full Changelog: 2.6.7...2.7.0
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.7...2.7.0
Fix macroPath comma typo by @viktorasbuivydas in #47
Full Changelog: 2.6.6...2.6.7
Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.6...2.6.7
Fixed dataLayer variables set through facade not being outputted by @FrittenKeeZ in #45
Full Changelog: 2.6.5...2.6.6
Change instance to bind in service provider by @fransjooste1 in #43
Full Changelog: 2.6.4...2.6.5
Nothing published for this version
Nothing published for this version
Nothing published for this version
Get default values from .env file
Get default values from .env file
- Added: setId
setId- Fixed view creator
Separate the script to head and body sections
Added: support for L5.5 package discovery
Nothing published for this version
Fixed: Unescape unicode in DataLayer JSON
Fixed: toJson should always return a string
toJson should always return a string- Added: Flash function
Added: option to specify the path to macros
This is now a Laravel 5 specific package. Laravel 4 version can be found here: https://github.com/spatie/laravel4-googletagmanager
Changed: If GoogleTagManager is disabled, ApiKeyNotSetException won't throw
Bugfix: script rendering was missing $dataLayer
- First official release
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →