Skip to main content
The PHP client installs with one auto_prepend_file line and reads its whole configuration from constants or environment variables. See PHP install to get it running, and WordPress for the plugin. Each setting can be a define() or an environment variable of the same name. A constant wins if both are set.

Constants

The default exclusions

Set SNOWSEO_BEACON_EXCLUDE and you replace this list rather than adding to it, so repeat anything you still want skipped:

Spooling

Without SNOWSEO_BEACON_SPOOL, a hit that cannot be delivered is lost. With it, hits are written one JSON line at a time and drained on a later request. A network failure, a 429 or a 5xx opens a 5-minute circuit breaker, so a dead endpoint costs one attempt per five minutes rather than a full timeout on every page view. Spooled hits are kept for 23 hours, and the file is capped at 1 MB.
SNOWSEO_BEACON_HANDLED is set by the client itself, not by you. It tells the WordPress plugin - which loads far later, if at all - that this request already has an owner, so the two cannot double-count.

WordPress filters

snowseo_beacon_should_record exists so you can drop traffic without waiting for a plugin release. It cannot make the client record something the pre-filter already rejected.

What the client never does

  • No classification. It sends the raw User-Agent and lets the server decide. A client that graded its own traffic could simply assert a verdict.
  • No dependencies. Adding one would mean shipping an autoloader the WordPress build does not produce.
  • Nothing above PHP 7.4. No union types, no match, no constructor promotion, no nullsafe operator.
  • Nothing for ordinary visitors. The pre-filter runs before anything else, so a normal page view costs no measurable time and sends no request.

Where the source lives

The PHP client is built from a single core shared with the WordPress plugin, in the WordPress plugin repository. The JavaScript client and the ingest server are in Snow-SEO/beacon.