finds.dev

panphp/pan

A simple, lightweight, and privacy-focused product analytics php package

View on GitHub

★ 1,273PHPMITupdated Apr 2026

// the take

Pan is a small PHP package for Laravel that counts impressions, hovers, and clicks on elements tagged with a data-pan attribute, then shows the totals in an Artisan table. It suits Laravel teams who want rough per-element engagement numbers without adding a full analytics product or sending visitor data to a third party.

- The storage model is the privacy argument. Each row is an event name and a counter, so there is no IP, user-agent, or visitor identifier to store, secure, or delete. That is a much smaller compliance surface than most analytics setups.

- Ingestion has two guards against DOM tampering: an optional allowedAnalytics whitelist, and a default cap of 50 records. Defaulting to a cap is the right instinct for a public endpoint.

- Client-side events are batched before they reach the server, so a page with many tracked elements does not send one request per hover.

- The repo has more test and static-analysis weight than its size suggests: Pest feature and unit tests, PHPStan, Rector, an architecture test, and a CI workflow.

- Only counters are stored, with no timestamps, as the README describes it. You can see which tab wins overall but not whether that changed after a redesign, and trend over time is most of what product analytics is for.

- It is Laravel-only, and the requirement of PHP 8.3 and Laravel 11 excludes older apps. The Adapters/Laravel directory implies a framework-neutral core, but there is no second adapter yet, so that boundary is still an assumption.

- The README does not say what happens to events past the 50-record cap or how you would notice it. Anyone using dynamic names, such as per-row IDs or list items, is likely to hit the cap without knowing.

- Pan injects its script into every page through middleware. The README does not address Content-Security-Policy, ad blockers, or the script's size, and a site with a strict CSP will hit those problems first.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
1,273
Forks
63
Language
PHP
License
MIT
Last commit
12 Apr 2026

// nearby

If pan isn't quite it.

All repos →