Skip to content

Custom on-page test

Wygard lets you monitor any element on a page — not just the ones with a predefined test — by defining your own selector and watching the value it returns.

Scope Tier Default Alert
Per URL Basic Off — you define what to watch 🟠 Heads-up

Why it matters

The predefined tests cover the SEO fundamentals — canonical, meta tags, headings, status codes. But every site has its own signals that matter just as much: an in-stock indicator, a price, the number of products in a listing, the presence of a live-chat widget, a promo banner that should never disappear. When one of those breaks, no standard SEO test notices — but your conversions do.

A Custom on-page test closes that gap. You point Wygard at the element and it watches the extracted value exactly the way a predefined test watches a canonical. The default severity is Heads-up; the test is off until you create one.

What Wygard checks

You choose what to extract with one of three selector types:

  • CSSPath — a CSS selector, returning the first match (default), all matches, or a specific custom[n] match.
  • Regex — a regular expression, again first, all, or custom[n].
  • XPath — an XPath expression for anything CSS can't reach.

On every run, the crawler fetches the URL, evaluates your selector, and compares the extracted value against the stored desired value — the same baseline-and-compare lifecycle as every other test.

Reuse selectors across your project

Any selector-and-query combination can be saved into your project's Custom Selectors Library and reused on other URLs, so you only define a tricky XPath once.

Common alerts

  • Extracted value changed — the element still exists, but its content no longer matches the baseline (a price moved, a product count dropped).
  • Selector matched nothing — the element the selector targeted is no longer on the page (a widget removed, a class renamed in a redesign).
  • Match rule no longer satisfied — the value found doesn't meet the match method you configured.

Responding to an alert

  1. Open the alert and review the diff — Wygard shows the previous extracted value and the new one.
  2. Decide whether the change was intended (a real content or price update) or accidental (a template regression, a renamed class that broke your selector).
  3. If intended, adopt the new value as the baseline from the alert card.
  4. If accidental, fix the source — or, if the page markup changed on purpose, update the selector to match the new structure.

Start from what breaks silently

The best custom tests watch things that fail without any error page: a "Sold out" label that shouldn't appear, a tracking script that must always load, a hero CTA that a deploy could strip. If losing it would cost you money before you'd notice, it's a good candidate.