jeffersongoncalves/filament-gtm

This Laravel package seamlessly integrates Gtm analytics into your Blade templates. Easily track website visits and user engagement directly within your Laravel application, providing valuable insights into your website's performance. This package simplifies the integration process, saving you time

2.0.0 2025-07-17 14:53 UTC

This package is auto-updated.

Last update: 2025-07-17 14:54:37 UTC


README

Filament Google Tag Manager

Filament Google Tag Manager

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

This Filament plugin provides seamless integration of Google Tag Manager into your Filament admin panels. It automatically injects GTM tracking code into your Filament application without requiring any manual template modifications. The plugin leverages Filament's render hooks to automatically add the necessary GTM scripts to the head and body sections of your admin panels, enabling you to track user interactions and gather valuable insights about your admin interface usage.

Installation

You can install the package via composer:

composer require jeffersongoncalves/filament-gtm

Usage

This package automatically integrates Google Tag Manager with your Filament admin panels. Once installed, it will automatically inject the necessary GTM scripts into all your Filament panels without any additional configuration.

The package depends on jeffersongoncalves/laravel-gtm for GTM configuration. Please refer to that package's documentation for setting up your GTM container ID and other GTM-specific configurations.

Requirements

  • PHP 8.2 or higher
  • Laravel 11.0 or 12.0
  • Filament 4.0 or higher

Automatic Integration

The package automatically registers render hooks with Filament to inject GTM code:

  • GTM head script is automatically added to the <head> section
  • GTM body script is automatically added after the <body> tag

No manual template modifications are required.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.