### Install Filament Pixel via Composer Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/README.md Install the package via Composer. ```bash composer require jeffersongoncalves/filament-pixel ``` -------------------------------- ### Custom settings page override Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/resources/boost/skills/filament-pixel-development/SKILL.md Example of overriding the default settings page. Extend the base ManagePixelSettings and override the form() method to add custom fields or sections. After creating this class, disable the default settings page and register your custom page in the panel provider. ```php namespace App\Filament\Pages; use JeffersonGoncalves\Filament\Pixel\Pages\ManagePixelSettings as BaseSettings; class ManagePixelSettings extends BaseSettings { // Override form() to add custom fields or sections public function form(Schema $schema): Schema { return $schema ->columns(null) ->schema([ // Your custom schema here ]); } } ``` -------------------------------- ### Custom Pixel event in Blade view Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/resources/boost/skills/filament-pixel-development/SKILL.md Add custom Pixel events by placing JavaScript in your Blade views. This example tracks a Purchase event with a value of 25.00 USD. ```html ``` -------------------------------- ### Publish and Run Pixel Settings Migrations Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/README.md Publish and run the settings migration from laravel-pixel. ```bash php artisan vendor:publish --tag=pixel-settings-migrations php artisan migrate ``` -------------------------------- ### Run Tests with Composer Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/README.md Run the package test suite. ```bash composer test ``` -------------------------------- ### PixelServiceProvider class Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/resources/boost/skills/filament-pixel-development/SKILL.md Service provider that registers the render hook for script injection. The commented line shows the actual hook registration using FilamentView::registerRenderHook with PanelsRenderHook::HEAD_START. ```php namespace JeffersonGoncalves\Filament\Pixel; use Spatie\LaravelPackageTools\PackageServiceProvider; class PixelServiceProvider extends PackageServiceProvider { // Registers the render hook for script injection // FilamentView::registerRenderHook(PanelsRenderHook::HEAD_START, fn (): View => view('pixel::script')); } ``` -------------------------------- ### ManagePixelSettings default class Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/resources/boost/skills/filament-pixel-development/SKILL.md Default settings page class. It uses PixelSettings as the settings model and sets the navigation icon to 'heroicon-o-chart-bar'. ```php namespace JeffersonGoncalves\Filament\Pixel\Pages; use Filament\Pages\SettingsPage; use JeffersonGoncalves\Pixel\Settings\PixelSettings; class ManagePixelSettings extends SettingsPage { protected static string $settings = PixelSettings::class; protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-chart-bar'; } ``` -------------------------------- ### Disable Settings Page with settingsPage(false) Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/README.md Disable the settings page while keeping automatic script injection. ```php PixelPlugin::make() ->settingsPage(false), ``` -------------------------------- ### Register PixelPlugin in Filament Panel Provider Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/README.md Register the plugin in your Filament panel provider to enable the settings page and automatic script injection. ```php use JeffersonGoncalves\Filament\Pixel\PixelPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ PixelPlugin::make(), ]); } ``` -------------------------------- ### PixelPlugin class API Source: https://github.com/jeffersongoncalves/filament-pixel/blob/3.x/resources/boost/skills/filament-pixel-development/SKILL.md Shows the public API of the PixelPlugin class. The getId() method returns 'filament-pixel'. settingsPage() controls whether the settings page is enabled. ```php namespace JeffersonGoncalves\Filament\Pixel; use Filament\Contracts\Plugin; use Filament\Panel; class PixelPlugin implements Plugin { protected bool $hasSettingsPage = true; public static function make(): static; public static function get(): static; public function getId(): string; // returns 'filament-pixel' public function register(Panel $panel): void; public function boot(Panel $panel): void; public function settingsPage(bool $condition = true): static; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.