Analytics & Heuristics
See what people and agents actually do on your pages: clicks, scroll depth, dwell and focus heatmaps, with every session marked human or agent, which page analytics built for people cannot tell apart. One embed collects it and a Laravel package stores and reports it, with no third-party runtime dependencies.
What ships today
Each claim is checkable in the packages' READMEs.
One embed, three jobs
fancy-pixel renders the badge, sends a liveness beacon that proves the badge is really on screen, and starts the bundled fancy-heuristics-js collector, which streams clicks, scroll depth, pointer heatmaps and dwell to your endpoint.
Humans and agents, told apart
Every event carries an actor. Agent activity from an embedded agent becomes agent.act events, and every report takes an optional human or agent filter, so you can see how each one uses the same page.
Reports as plain arrays
fancy-heuristics answers acquisition, audience, sessions, top, entry and exit pages, the most-activated controls, event names and the last five minutes, each for a site and a date range, as JSON-friendly arrays your own UI renders.
Consent first
Consent is denied by default: without a grant, the pixel renders the badge and sends the liveness beacon but collects no analytics. Leave out the endpoint and it makes no network request at all.
A public endpoint, bounded
The collect endpoint is public, so every batch is bounded: events per batch, path and label lengths, meta size, coordinates and timestamp skew. Paths are stored without their query string, and a response never echoes a submitted value.
Retention you schedule
heuristics:prune deletes by data class, with a dry run that only counts: raw events after 90 days, pointer samples after 14, sessions after 395. Pixel pings store an HMAC of the IP, never the IP.
The embed
fancy-pixel renders into an open Shadow DOM, so the host page's CSS cannot hide it, and marks itself with a stable data-fancy-badge handle that a scanner or an agent reads.
The wordmark and glyph
The glyph only
A small pulsing dot
Each card mounts the real pixel inline, with no endpoint, so nothing leaves this page. On a site you would mount one, floating, with your endpoint, and it would start collecting once the visitor grants consent.
use FancyHeuristics\Facades\Heuristics;
Heuristics::acquisition($site, 30); // referrer hosts, utm, direct vs referral
Heuristics::sessionsSummary($site, 30); // totals, avg duration, bounce rate
Heuristics::topElements($site, 30, 'agent'); // the controls agents activated most
Heuristics::timeseries($site, 30, 'day', true); // sessions per day, split human / agentSee it on this site
This showcase runs on these packages. Sign in with GitHub and open the analytics dashboard for a site you have submitted to the showcase. Consent banners and the consent record are on the Compliance feature.
How it fits
fancy-heuristics is the Laravel backend; fancy-heuristics-js is the browser collector, also usable on its own; fancy-pixel bundles that collector behind one script tag.
Install
composer require particle-academy/fancy-heuristicsnpm install @particle-academy/fancy-heuristics-jsnpm install @particle-academy/fancy-pixel
The packages
End-user optimization, not search-engine optimization — human + agent interaction analytics for Laravel: event ingestion, focus heatmaps, and session/actor rollups, plus Fancy Pixel verification. Server side of fancy-pixel / fancy-heuristics-js.
Browser collector for Fancy Heuristics — clicks, scroll, time-on-page, and mouse-movement focus heatmaps for humans and agents; sendBeacon batching. Headless.
Embeddable Showcase verification badge + liveness/collection beacon — Badge / Mark / Beacon styles, placed or floating, Shadow-DOM isolated. Drops in via a <script> tag or mountPixel().
Add analytics to your app
Install fancy-heuristics, mount fancy-pixel with your endpoint and site key, and read the reports from the Heuristics facade.

