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
Requires
- php: ^8.2|^8.3
- filament/filament: ^4.0
- jeffersongoncalves/laravel-gtm: ^1.0
- laravel/framework: ^11.0|^12.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^3.0
- orchestra/testbench: ^9.0|^10.0
This package is auto-updated.
Last update: 2025-07-17 14:54:37 UTC
README
Filament Google Tag Manager
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.