Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Googletagmanager Laravel Package

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.

View on GitHub
Deep Wiki
Context7
3.1.1

Add Laravel 13 support

3.1.0

What's Changed

New Features

  • Add CSP nonce support for script tags via 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.

2.8.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.8.0...2.8.1

2.7.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-googletagmanager/compare/2.6.7...2.7.0

2.6.6
2.6.5
2.6.4
2.6.3
2.6.1

Get default values from .env file

2.6.0
  • Added: setId
2.5.1
  • Fixed view creator
2.5.0
  • Separate the script to head and body sections
2.4.0
  • Added: support for L5.5 package discovery
2.2.3
  • Fixed: Unescape unicode in DataLayer JSON
2.2.1
  • Fixed: toJson should always return a string
2.2.0
  • Added: Flash function
2.1.0
  • Added: option to specify the path to macros
2.0.0
1.2.2
  • Changed: If GoogleTagManager is disabled, ApiKeyNotSetException won't throw
1.2.1
  • Bugfix: script rendering was missing $dataLayer
1.2.0
  • First official release
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core