jeffersongoncalves/filament-gtm

Filament plugin for Google Tag Manager with settings page powered by Spatie Laravel Settings

Installs: 35

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

pkg:composer/jeffersongoncalves/filament-gtm

3.1.0 2026-02-23 00:20 UTC

This package is auto-updated.

Last update: 2026-02-24 18:45:16 UTC


README

Filament Gtm

Filament Google Tag Manager

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

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.

Installation

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

Usage

Register the Plugin

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:

  • Register a Settings Page where you can manage your GTM container ID
  • Automatically inject GTM scripts into the <head> and <body> sections of your Filament panels

Customization

Disable Settings Page

If you only want the automatic GTM injection without the settings page:

GtmPlugin::make()
    ->settingsPage(false),

Requirements

  • PHP 8.2 or higher
  • Filament 5.0
  • Laravel 11.0 or higher

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.