Your privacy choices

We use necessary cookies, and others only if you allow them. You can change your mind at any time.

Feature · End-user optimization, not SEO

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.

PHPNode / TypeScriptReact

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.

fancy-pixel mountPixel(), in all three stylesLive · sends nothing
Badgestyle: badge

The wordmark and glyph

Markstyle: mark

The glyph only

Beaconstyle: beacon

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.

On your site
import { mountPixel } from "@particle-academy/fancy-pixel";

mountPixel({
  style: "badge",
  mode: "floating",
  siteKey: "YOUR_SITE_KEY",
  endpoint: "https://your-host/heuristics",
  consent: () => hasAnalyticsConsent(), // denied by default
});
In your Laravel app
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 / agent

See 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

  1. particle-academy/fancy-heuristicsPHP
    composer require particle-academy/fancy-heuristics
  2. @particle-academy/fancy-heuristics-jsNode / TypeScript
    npm install @particle-academy/fancy-heuristics-js
  3. fancy-pixelReact
    npm install @particle-academy/fancy-pixel

The packages

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.