PHPackages                             vitorbizarra/laravel-gtag - 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. vitorbizarra/laravel-gtag

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

vitorbizarra/laravel-gtag
=========================

This is my package laravel-gtag

2.0.2(2y ago)0387[4 PRs](https://github.com/vitorbizarra/laravel-gtag/pulls)MITPHPPHP ^8.2CI passing

Since May 7Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/vitorbizarra/laravel-gtag)[ Packagist](https://packagist.org/packages/vitorbizarra/laravel-gtag)[ Docs](https://github.com/vitorbizarra/laravel-gtag)[ GitHub Sponsors]()[ RSS](/packages/vitorbizarra-laravel-gtag/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (14)Used By (0)

This is my package laravel-gtag
===============================

[](#this-is-my-package-laravel-gtag)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c7b38e7f09bd99713bf6fbeda731c317003205ea86dfc345434e3d306b766d6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7669746f7262697a617272612f6c61726176656c2d677461672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vitorbizarra/laravel-gtag)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/70428d855d8283d7b89310de71652d957e9b96f7b746262f830170392ee1c70e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7669746f7262697a617272612f6c61726176656c2d677461672f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/vitorbizarra/laravel-gtag/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0f675916771681e0d04882bb900c4aa09a8017f662112086ed509a10fa6cbc9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7669746f7262697a617272612f6c61726176656c2d677461672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vitorbizarra/laravel-gtag)

An package to easily setup Google GTag in Laravel apps

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

[](#installation)

You can install the package via composer:

```
composer require vitorbizarra/laravel-gtag
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-gtag-config"
```

This is the contents of the published config file:

```
return [
    /*
     * The Google Analytics id, should be a code that looks something like "G-xxxx".
     */
    'id' => env('GTAG_ID', ''),

    /*
     * Enable or disable script rendering. Useful for local development.
     */
    'enabled' => env('GTAG_ENABLED', true),

    /*
     * Configures the Google Analytics script domain.
     */
    'domain' => env('GTAG_DOMAIN', 'www.googletagmanager.com'),
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laravel-gtag-views"
```

Usage
-----

[](#usage)

```
{{-- layout.blade.php --}}

  @include('gtag::script')
  {{-- ... --}}

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Vitor Bizarra](https://github.com/vitorbizarra)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance58

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 68.4% 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.

###  Release Activity

Cadence

Every ~0 days

Total

7

Last Release

736d ago

Major Versions

1.0.3 → 2.0.02024-05-07

### Community

Maintainers

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

---

Top Contributors

[![vitorbizarra](https://avatars.githubusercontent.com/u/79993997?v=4)](https://github.com/vitorbizarra "vitorbizarra (26 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

analyticscomposergooglegoogle-analyticslaravellaravel-packagepackagistspatielaravellaravel-gtagVitor Bizarra

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vitorbizarra-laravel-gtag/health.svg)

```
[![Health](https://phpackages.com/badges/vitorbizarra-laravel-gtag/health.svg)](https://phpackages.com/packages/vitorbizarra-laravel-gtag)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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