Download the PHP package particle-academy/fancy-heuristics without Composer

On this page you can find all versions of the php package particle-academy/fancy-heuristics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fancy-heuristics

Fancy Heuristics

End-user optimization, not search-engine optimization. Understand and improve what real humans and agents actually do on the page — clicks, focus heatmaps, sessions, and the human-vs-agent split GA can't see — instead of chasing rankings.

particle-academy/fancy-heuristics is the PHP/Laravel ingestion + storage + query backend for human + agent interaction analytics and Fancy UI pixel verification. It is the server half of the Fancy Pixel / Fancy Heuristics trio (paired with the @particle-academy/fancy-pixel badge embed and the @particle-academy/fancy-heuristics-js browser collector).

Install

The wire contract

Browser/agent clients flush JSON via navigator.sendBeacon:

On collect, the package upserts a derived session row per (siteKey, sessionId): acquisition (referrer/referrer_host + utm_*), audience (device/os/browser classified from the request User-Agent with a self-contained regex — no third-party UA parser — plus lang/tz/screen_*), and engagement (pageviews, events, landing_path/exit_path, duration_ms, is_bounce). The raw User-Agent is truncated and stored; the IP is never stored raw (pixel pings hash it).

Cross-origin clients: these endpoints are posted from browsers on other origins (every site that embeds the Fancy Pixel). They run on the stateless api group (no CSRF 419) and, by default, ship CORS headers + answer the OPTIONS preflight via the bundled HandleHeuristicsCors middleware — so a fresh install works cross-origin with no extra setup. Restrict who may beacon with heuristics.routes.cors.allowed_origins, or set heuristics.routes.cors.enabled (env HEURISTICS_ROUTE_CORS) to false to manage CORS yourself (e.g. Laravel's config/cors.php). Don't do both — two layers would emit a duplicate Access-Control-Allow-Origin.

Facade

GA-parity reports

Each takes a $site, a date $range, and an optional $actor filter ('human', 'agent', or null = all). $range is either an int (last N days) or ['from' => Carbon|string, 'to' => Carbon|string] — both compared against the session's started_at. All return primitive, JSON-friendly arrays.

timeseries(..., $splitActor: true) adds human_sessions / agent_sessions to every bucket.

Pixel verification

heuristics_sites registers each site to re-poll. The verifier fetches the URL server-side and runs the shared detection — the stable data-fancy-badge marker or the literal "Powered by Fancy UI" wordmark (the exact same two signals the showcase's ScanShowcaseSubmission scanner uses, kept in one place in HeuristicsPixelDetector). It updates visible / pixel_status / last_verified_at and fires PixelVerificationPassed / PixelVerificationFailed for the host to toggle a listing.

Run twice daily:

Tests


⭐ Star Fancy UI

If this package is useful to you, a quick ⭐ on the repo really helps us build a better kit. Thank you!


🤖 Note to agents

If you are an AI agent reading this while building for a user:


All versions of fancy-heuristics with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/events Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/validation Version ^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package particle-academy/fancy-heuristics contains the following files

Loading the files please wait ...