PackageTrack
Sign in Get early access

spatie/laravel-googletagmanager

Google Tag Manager integration for Laravel

3.1.1 3.9M downloads/mo #2721 most downloaded on Packagist spatie/laravel-googletagmanager

What this package is like to depend on

Last release 6 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

3 releases in the last 12 months

see the full history below

Release timeline

32 releases · Jun 2015 to Feb 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 32
  1. 3.1.1 21 Feb 2026
    Release notes

    Add Laravel 13 support

    Open source →
  2. 3.1.0 31 Jan 2026
    Release notes

    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.

    Open source →
    Release notes

    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.

    Open source →
  3. 3.0.0 12 Sep 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.8.1...3.0.0

    Open source →
    Release notes

    What's Changed

    • Update issue template by @AlexVanderbist in https://github.com/spatie/laravel-googletagmanager/pull/59
    • 3.x by @bram-pkg in https://github.com/spatie/laravel-googletagmanager/pull/58

    New Contributors

    • @AlexVanderbist made their first contribution in https://github.com/spatie/laravel-googletagmanager/pull/59

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

    Open source →
  4. 2.8.1 18 Aug 2025
    Release notes

    What's Changed

    • Add support for Laravel Octane by using the "scoped" method if it exists by @bram-pkg in #57

    New Contributors

    Full Changelog: 2.8.0...2.8.1

    Open source →
    Release notes

    What's Changed

    • Add support for Laravel Octane by using the "scoped" method if it exists by @bram-pkg in https://github.com/spatie/laravel-googletagmanager/pull/57

    New Contributors

    • @bram-pkg made their first contribution in https://github.com/spatie/laravel-googletagmanager/pull/57

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

    Open source →
  5. 2.8.0 09 May 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.7.1...2.8.0

    Open source →
    Release notes

    What's Changed

    • Flashing push data by @jmsfwk in https://github.com/spatie/laravel-googletagmanager/pull/55

    New Contributors

    • @jmsfwk made their first contribution in https://github.com/spatie/laravel-googletagmanager/pull/55

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

    Open source →
  6. 2.7.1 01 Mar 2024
    Release notes

    What's Changed

    Full Changelog: 2.7.0...2.7.1

    Open source →
    Release notes

    What's Changed

    • Set data-layer values before initialization by @mithredate in https://github.com/spatie/laravel-googletagmanager/pull/52

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

    Open source →
  7. 2.7.0 26 Feb 2024
    Release notes

    What's Changed

    • Allow setting custom domains for serving gtm.js by @mithredate in #51

    New Contributors

    Full Changelog: 2.6.7...2.7.0

    Open source →
    Release notes

    What's Changed

    • Allow setting custom domains for serving gtm.js by @mithredate in https://github.com/spatie/laravel-googletagmanager/pull/51

    New Contributors

    • @mithredate made their first contribution in https://github.com/spatie/laravel-googletagmanager/pull/51

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

    Open source →
  8. 2.6.7 11 Dec 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.6.6...2.6.7

    Open source →
    Release notes

    What's Changed

    • Fix macroPath comma typo by @viktorasbuivydas in https://github.com/spatie/laravel-googletagmanager/pull/47
    • 👌 IMPROVE: delay push after load event by @mickaelperrin in https://github.com/spatie/laravel-googletagmanager/pull/50

    New Contributors

    • @viktorasbuivydas made their first contribution in https://github.com/spatie/laravel-googletagmanager/pull/47
    • @mickaelperrin made their first contribution in https://github.com/spatie/laravel-googletagmanager/pull/50

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

    Open source →
  9. 2.6.6 15 Dec 2021
    Release notes

    What's Changed

    • Fixed dataLayer variables set through facade not being outputted by @FrittenKeeZ in #45

    Full Changelog: 2.6.5...2.6.6

    Open source →
  10. 2.6.5 13 Dec 2021
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.6.4...2.6.5

    Open source →
  11. 2.6.4 11 Dec 2021

    Nothing published for this version

  12. 2.6.3 17 Nov 2021

    Nothing published for this version

  13. 2.6.2 13 Sep 2019

    Nothing published for this version

  14. 2.6.1 21 Aug 2019
    Release notes

    Get default values from .env file

    Open source →
  15. 2.6.0 29 Oct 2018
    Release notes
    • Added: setId
    Open source →
  16. 2.5.1 15 Oct 2018
    Release notes
    • Fixed view creator
    Open source →
  17. 2.5.0 26 Jul 2018
    Release notes
    • Separate the script to head and body sections
    Open source →
  18. 2.4.0 26 Oct 2017
    Release notes
    • Added: support for L5.5 package discovery
    Open source →
  19. 2.3.0 14 Feb 2017

    Nothing published for this version

  20. 2.2.3 12 May 2017
    Release notes
    • Fixed: Unescape unicode in DataLayer JSON
    Open source →
  21. 2.2.1 22 Jun 2016
    Release notes
    • Fixed: toJson should always return a string
    Open source →
  22. 2.2.0 25 Jun 2015
    Release notes
    • Added: Flash function
    Open source →
  23. 2.1.0 24 Jun 2015
    Release notes
    • Added: option to specify the path to macros
    Open source →
  24. v2.0.0 11 Jun 2015
    Release notes
    • This is now a Laravel 5 specific package. Laravel 4 version can be found here: https://github.com/spatie/laravel4-googletagmanager
    Open source →
  25. 1.2.2 11 Jun 2015
    Release notes
    • Changed: If GoogleTagManager is disabled, ApiKeyNotSetException won't throw
    Open source →
  26. 1.2.1 11 Jun 2015
    Release notes
    • Bugfix: script rendering was missing $dataLayer
    Open source →
  27. 1.2.0 10 Jun 2015
    Release notes
    • First official release
    Open source →
  28. 1.1.2 08 Jun 2015

    Nothing published for this version

  29. 1.1.1 08 Jun 2015

    Nothing published for this version

  30. 1.1.0 08 Jun 2015

    Nothing published for this version

  31. 1.0.1 05 Jun 2015

    Nothing published for this version

  32. 1.0.0 04 Jun 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive