PHPackages                             awcodes/gtm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. awcodes/gtm

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

awcodes/gtm
===========

Easy integration of Google Tag Manager into your Laravel application.

v2.0.0(1y ago)51.3kMITPHPPHP ^8.2CI passing

Since Dec 12Pushed 1w ago1 watchersCompare

[ Source](https://github.com/awcodes/gtm)[ Packagist](https://packagist.org/packages/awcodes/gtm)[ Docs](https://github.com/awcodes/gtm)[ GitHub Sponsors](https://github.com/awcodes)[ RSS](/packages/awcodes-gtm/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (8)Versions (6)Used By (0)

Google Tag Manager for Laravel
==============================

[](#google-tag-manager-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0502bf15f67011923730186c1874c38c085600ba40234163fbaceb5e70317057/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6177636f6465732f67746d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/awcodes/gtm)[![Total Downloads](https://camo.githubusercontent.com/9eea5fe013496ead608f2f6632f4d6e9660ec013416f778a36edcc4a5161ef1d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6177636f6465732f67746d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/awcodes/gtm)

Easy integration of Google Tag Manager into your Laravel application.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require awcodes/gtm
```

You can publish the config file with:

```
php artisan vendor:publish --tag="gtm-config"
```

This is the contents of the published config file:

```
return [
    'id' => env('GTM_ID', 'GTM-XXXXXX'),
    'enabled' => env('GTM_ENABLED', true),
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="gtm-views"
```

Usage
-----

[](#usage)

1. Add your GTM\_ID to your `.env` file
2. Simply add the blade components to your base layout files.

The `enabled` attribute is optional, but can be used to control the tags integration from blade files that extend the base layout. It accepts `true/false`. This can still be controlled globally via the `.env` file should you need to disable the integration global on different environments as well.

```

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [awcodes](https://github.com/awcodes)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance75

Regular maintenance activity

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~252 days

Total

3

Last Release

429d ago

Major Versions

v1.1.0 → v2.0.02025-04-30

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3596800?v=4)[Adam Weston](/maintainers/awcodes)[@awcodes](https://github.com/awcodes)

---

Top Contributors

[![awcodes](https://avatars.githubusercontent.com/u/3596800?v=4)](https://github.com/awcodes "awcodes (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (18 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")

---

Tags

laravellaravelGoogle Tag Managergtmawcodes

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/awcodes-gtm/health.svg)

```
[![Health](https://phpackages.com/badges/awcodes-gtm/health.svg)](https://phpackages.com/packages/awcodes-gtm)
```

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)[awcodes/richer-editor

A collection of extensions and tools to enhance the Filament Rich Editor field.

3912.8k9](/packages/awcodes-richer-editor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
