PHPackages                             vizuh/filament-clicktrail - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. vizuh/filament-clicktrail

ActiveLibrary[Admin Panels](/categories/admin)

vizuh/filament-clicktrail
=========================

Filament 3 plugin for ClickTrail attribution: settings page, attribution record dashboard, diagnostics widget, and Laravel/Filament event mapping.

v0.1.1(today)00[2 issues](https://github.com/vizuh/clicktrail-filament/issues)MITPHPPHP &gt;=8.1CI passing

Since Aug 25Pushed todayCompare

[ Source](https://github.com/vizuh/clicktrail-filament)[ Packagist](https://packagist.org/packages/vizuh/filament-clicktrail)[ RSS](/packages/vizuh-filament-clicktrail/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

[English](README.md) | [Português](README.pt-BR.md) | [Deutsch](README.de.md) | [中文](README.zh-CN.md)

**vizuh/filament-clicktrail**

ClickTrail attribution inside your Filament 3 panel — settings, read-only attribution records, suppression diagnostics, and event mapping. Nothing to build by hand.

[![CI](https://github.com/vizuh/clicktrail-filament/actions/workflows/ci.yml/badge.svg)](https://github.com/vizuh/clicktrail-filament/actions/workflows/ci.yml)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)

Index
-----

[](#index)

- [Why](#why)
- [Installation](#installation)
- [Quick start](#quick-start)
- [Event mapping](#event-mapping)
- [Attribution records](#attribution-records)
- [Settings and configuration](#settings-and-configuration)
- [Diagnostics](#diagnostics)
- [Consent contract](#consent-contract)
- [How it differs](#how-it-differs)
- [Testing](#testing)
- [License](#license)

Why
---

[](#why)

Attribution data nobody can see is attribution nobody trusts. This plugin surfaces ClickTrail's stored first/last-touch records, consent snapshots, and suppression diagnostics directly inside an existing Filament panel — strictly read-only, because attribution state belongs to the capture pipeline, never to hand edits.

Requires PHP &gt;= 8.1, Laravel 12.60+ or 13.10+, Filament 3.3.55+, and [`clicktrail/php-sdk`](https://github.com/vizuh/clicktrail-php).

Installation
------------

[](#installation)

```
composer require vizuh/filament-clicktrail
php artisan vendor:publish --tag=clicktrail-filament
php artisan migrate
```

Quick start
-----------

[](#quick-start)

Register the plugin on any panel:

```
use ClickTrail\Filament\ClickTrailPlugin;

public function panel(Panel $panel): Panel
{
    return $panel->plugin(ClickTrailPlugin::make());
}
// The panel now shows a "ClickTrail" navigation group: the Settings page,
// the read-only Attribution Records table (auto-refreshing every 60s), and
// the diagnostics stats widget. No further wiring.
```

Event mapping
-------------

[](#event-mapping)

`Support\EventMap` maps Eloquent model events onto canonical `Stable::EVENT_*` names, so your lead and order models speak ClickTrail's vocabulary without glue code:

```
use App\Models\Lead;
use ClickTrail\Filament\Support\EventMap;

EventMap::resolve(new Lead(), 'created');  // 'lead.submitted' — canonical event name
EventMap::resolve(new Lead(), 'deleted');  // 'sale.refunded' — deletion maps to refund
```

Model basenames map by default (`lead`, `appointment`, `sale`, `order`). Extend or override per model through the `clicktrail-filament.event_map` config key; a basename ending in `refund` resolves to `sale.refunded`, and events containing `attended` resolve to `appointment.attended`.

Attribution records
-------------------

[](#attribution-records)

The `AttributionRecordResource` table shows stored first/last-touch records with channel filters and a compact consent-snapshot column:

```
TextColumn::make('first_channel')->badge();          // paid_search | organic_search | ...
SelectFilter::make('first_channel');                 // filter by canonical channel name
TextColumn::make('consent_snapshot_summary');        // "analytics_storage=granted, ad_user_data=denied"
```

There are no create/edit/delete pages and no routes to them: `canCreate()`, `canEdit()`, `canDelete()` all return false. The table polls every 60 seconds.

Settings and configuration
--------------------------

[](#settings-and-configuration)

The settings page edits the published `clicktrail-filament.php` config:

```
'site_id'           => env('CLICKTRAIL_SITE_ID', ''),   // issued by the collector
'endpoint'          => env('CLICKTRAIL_ENDPOINT', 'https://collect.clicktrail.dev/v1/events/batch'),
'consent_resolver'  => env('CLICKTRAIL_CONSENT_RESOLVER', ''), // empty => NullConsentResolver
'capability_gates'  => ['analytics' => true, 'advertising' => true, 'ad_user_data' => true],
```

A capability gate that is off means that use does not require CMP consent (gate-toggle semantics). Note: settings save currently writes back to the config repository at runtime; durable persistence lands with the settings-storage work in progress.

Diagnostics
-----------

[](#diagnostics)

The stats widget reads `clicktrail_diagnostics` counters — one stat per suppression reason, colored warning when nonzero:

```
Stat::make('adUserDataUnknownAtCapture', '12') // count of suppressed deliveries for this reason
    ->description('Last seen 2 hours ago')
```

With no suppressions recorded you get a green `Suppressions = 0` stat. Queue depth shows `-` until the queued-delivery job ships (deferred pending live verification).

Consent contract
----------------

[](#consent-contract)

This plugin is a consent consumer, not a CMP. It reads a normalized `ConsentSnapshot` (granted / denied / unknown / not\_applicable) through the Laravel adapter's `ConsentResolverInterface`. Every unresolved signal counts as **denied**: suppressed deliveries become diagnostics rows instead of being sent.

```
if (! ConsentBehavior::can($snapshot, 'ad_user_data')) {
    // delivery suppressed; reason recorded in clicktrail_diagnostics,
    // visible in the Diagnostics widget immediately
}
```

How it differs
--------------

[](#how-it-differs)

This pluginGeneric admin CRUDAttribution recordsRead-only display of pipeline-owned stateEditable rows invite silent data corruptionConsentUnknown = denied, enforced upstream of deliveryOften a display-only flagEventsCanonical `Stable::EVENT_*` names shared with every ClickTrail adapterPer-project invented event namesIt does not capture touches or deliver batches itself — the Laravel adapter pipeline owns that; this plugin makes its results visible and auditable.

Testing
-------

[](#testing)

No PHPUnit suite ships yet. CI lints every PHP file on PHP 8.1–8.3:

```
composer install --prefer-dist --no-interaction || echo "no deps"
find . -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l   # exits clean on success
```

License
-------

[](#license)

MIT.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20295730?v=4)[Hugo ](/maintainers/Atroci)[@Atroci](https://github.com/Atroci)

---

Top Contributors

[![Atroci](https://avatars.githubusercontent.com/u/20295730?v=4)](https://github.com/Atroci "Atroci (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

analyticsattributionclickstreamconsent-managementconversion-trackingdashboarddiagnosticsfilamentfilament-pluginfirst-party-datagdprlaravelmarketing-analyticsphputmlaravelfilamentUTMattributionconsentgclid

### Embed Badge

![Health badge](/badges/vizuh-filament-clicktrail/health.svg)

```
[![Health](https://phpackages.com/badges/vizuh-filament-clicktrail/health.svg)](https://phpackages.com/packages/vizuh-filament-clicktrail)
```

###  Alternatives

[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

2324.4k1](/packages/mradder-filament-logger)[a2insights/filament-saas

Filament Saas for A2Insights

191.8k](/packages/a2insights-filament-saas)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
