PHPackages                             hiqdev/yii2-google-tag-manager - 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. hiqdev/yii2-google-tag-manager

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

hiqdev/yii2-google-tag-manager
==============================

Google Tag Manager widget for Yii2 applications

38.2k2PHPCI failing

Since Jul 10Pushed 5y ago2 watchersCompare

[ Source](https://github.com/hiqdev/yii2-google-tag-manager)[ Packagist](https://packagist.org/packages/hiqdev/yii2-google-tag-manager)[ RSS](/packages/hiqdev-yii2-google-tag-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Google Tag Manager
=======================

[](#yii2-google-tag-manager)

**Google Tag Manager widget for Yii2 applications**

[![Latest Stable Version](https://camo.githubusercontent.com/40b1c3057c33f33a7a6f1968888c4ec278c6c010e918c3ff34d111e130f5c505/68747470733a2f2f706f7365722e707567782e6f72672f6869716465762f796969322d676f6f676c652d7461672d6d616e616765722f762f737461626c65)](https://packagist.org/packages/hiqdev/yii2-google-tag-manager)[![Total Downloads](https://camo.githubusercontent.com/cc0cb16f035932f57efd9fc59b900285edcf3542a5d619094338ff0cc49d3eee/68747470733a2f2f706f7365722e707567782e6f72672f6869716465762f796969322d676f6f676c652d7461672d6d616e616765722f646f776e6c6f616473)](https://packagist.org/packages/hiqdev/yii2-google-tag-manager)[![Build Status](https://camo.githubusercontent.com/2191b49b5be852ce9b469a97a8f66f6de241d552415e962c1dbdcd97dffc8dd4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6869716465762f796969322d676f6f676c652d7461672d6d616e616765722e737667)](https://travis-ci.org/hiqdev/yii2-google-tag-manager)[![Scrutinizer Code Coverage](https://camo.githubusercontent.com/1c125754cb1604d5a40fd2153d2fa9b7bdaff6492f220474baff547c99d9db2a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6869716465762f796969322d676f6f676c652d7461672d6d616e616765722e737667)](https://scrutinizer-ci.com/g/hiqdev/yii2-google-tag-manager/)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f28cca50c558a4eb65ebf9db84c02d8f9e3ee793d263db200c31efbd43692beb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6869716465762f796969322d676f6f676c652d7461672d6d616e616765722e737667)](https://scrutinizer-ci.com/g/hiqdev/yii2-google-tag-manager/)

Provides really easy adding [Google Tag Manager](https://tagmanager.google.com/) snippet to a site. Even easier then adding a widget into a site layout.

Works by adding Behavior to the Application View. Behavior listens to [EVENT\_BEGIN\_BODY](http://www.yiiframework.com/doc-2.0/yii-web-view.html#EVENT_BEGIN_BODY-detail) and echos the snippet.

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

[](#installation)

The preferred way to install this yii2-extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require "hiqdev/yii2-google-tag-manager"
```

or add

```
"hiqdev/yii2-google-tag-manager": "*"
```

to the require section of your composer.json.

Configuration
-------------

[](#configuration)

This extension is supposed to be used with [composer-config-plugin](https://github.com/hiqdev/composer-config-plugin).

Else look [config/web.php](config/web.php) for cofiguration example.

Available configuration parameters:

- `GoogleTagManager.id`

For more details please see [config/params.php](config/params.php).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ccb75e3312d6bd454ea445ea308139fd185a4ca906ca5df21cc66e6a35de25a3?d=identicon)[SilverFire](/maintainers/SilverFire)

![](https://www.gravatar.com/avatar/790fd24da129907d373559f60c6994f664f06e3f518502c03580cc9f3594615e?d=identicon)[hiqdev](/maintainers/hiqdev)

![](https://www.gravatar.com/avatar/99106256c24a8cb23871b99fa90e48f37f1aa71608c185759b7d2a88683a5918?d=identicon)[hiqsol](/maintainers/hiqsol)

---

Top Contributors

[![hiqsol](https://avatars.githubusercontent.com/u/11820365?v=4)](https://github.com/hiqsol "hiqsol (4 commits)")[![strorch](https://avatars.githubusercontent.com/u/23340907?v=4)](https://github.com/strorch "strorch (4 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/hiqdev-yii2-google-tag-manager/health.svg)

```
[![Health](https://phpackages.com/badges/hiqdev-yii2-google-tag-manager/health.svg)](https://phpackages.com/packages/hiqdev-yii2-google-tag-manager)
```

###  Alternatives

[cawakharkov/laravel-balance

Laravel package that provide user balance and transactions functionality for Laravel 5

121.0k2](/packages/cawakharkov-laravel-balance)

PHPackages © 2026

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