| Install | |
|---|---|
composer require jeffersongoncalves/filament-gtm |
|
| Latest Version: | 3.1.1 |
| PHP: | ^8.2 |

Filament plugin for Google Tag Manager with a settings page powered by Spatie Laravel Settings. Manage your GTM container ID directly from the Filament admin panel.
You can install the package via composer:
composer require jeffersongoncalves/filament-gtm:"^3.0"
Publish the settings migrations and run them:
php artisan vendor:publish --tag=gtm-settings-migrations
php artisan migrate
Add the plugin to your Filament panel provider:
use JeffersonGoncalves\Filament\Gtm\GtmPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
GtmPlugin::make(),
]);
}
The plugin will:
<head> and <body> sections of your Filament panelsIf you only want the automatic GTM injection without the settings page:
GtmPlugin::make()
->settingsPage(false),
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.