定制 jeffersongoncalves/filament-analytics-core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jeffersongoncalves/filament-analytics-core

Composer 安装命令:

composer require jeffersongoncalves/filament-analytics-core

包简介

Shared base classes for jeffersongoncalves Filament analytics-injector plugins (script render-hook injection + optional Spatie settings page).

README 文档

README

Filament Analytics Core

Filament Analytics Core

Latest Version on Packagist GitHub Code Style Action Status Total Downloads License

Shared base classes for the jeffersongoncalves Filament analytics-injector plugins (Fathom, GA4/gtag, GTM, Matomo, Mixpanel, Meta Pixel, Plausible, Umami). Built on top of filament-plugin-core.

Version Compatibility

Branch Filament PHP Laravel
1.x 3.x ^8.2 ^11.0
2.x 4.x ^8.2 ^11.0
3.x 5.x ^8.2 ^11.0

Requirements

  • PHP 8.2 or higher
  • Laravel 11.0 or higher
  • Filament 5.x (3.x branch)

Installation

You can install the package via composer:

composer require jeffersongoncalves/filament-analytics-core:"^3.0"

What it provides

  • AbstractAnalyticsPlugin — registers an optional settings page and exposes the settingsPage(bool) toggle. Subclass declares getId() and getSettingsPageClass().
  • AbstractAnalyticsServiceProvider — wires hasTranslations() and injects the tracking script(s) via render hooks. Subclass declares packageName() and renderHooks().

Usage

Plugin

use JeffersonGoncalves\FilamentAnalyticsCore\AbstractAnalyticsPlugin;

class FathomPlugin extends AbstractAnalyticsPlugin
{
    public function getId(): string
    {
        return 'filament-fathom';
    }

    protected function getSettingsPageClass(): ?string
    {
        return FathomSettingsPage::class;
    }
}

Service Provider

use Filament\View\PanelsRenderHook;
use JeffersonGoncalves\FilamentAnalyticsCore\AbstractAnalyticsServiceProvider;

class FathomServiceProvider extends AbstractAnalyticsServiceProvider
{
    protected function packageName(): string
    {
        return 'filament-fathom';
    }

    protected function renderHooks(): array
    {
        return [
            PanelsRenderHook::HEAD_START => 'fathom::script',
        ];
    }
}

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.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固