finds.dev← search

// the find

panphp/pan

★ 1,273 · PHP · MIT · updated Apr 2026

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

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.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →