Site SpySite Spy
Dashboard

CSS & XPath Filters

Monitor specific page sections using CSS selectors and XPath expressions

Filters let you control exactly which parts of a page Site Spy monitors. Instead of tracking the entire page (and getting notifications for every small change), you can focus on specific sections and ignore the rest.

Filters are available on all plans, including Free.

Filter types

Each watch has three filter fields, accessible from the Watch Settings gear icon:

Monitor Only (include filters)

CSS or XPath selectors that limit monitoring to specific page sections. Only content matching these selectors is tracked — everything else is ignored.

CSS examples:

  • #price — element with id "price"
  • .product-info — elements with class "product-info"
  • table.rates — a table with class "rates"
  • h1, h2, h3 — all headings

XPath examples:

  • //*[@id="price-table"] — element with id "price-table"
  • //div[@class="rates"] — div with class "rates"
  • //table[1] — the first table on the page

You can add multiple selectors — each one on its own line.

Exclude Elements (subtractive selectors)

CSS selectors for elements to remove before checking for changes. Useful for filtering out noisy sections while keeping the rest of the page.

Examples:

  • .cookie-banner — remove cookie consent banners
  • #ads — remove ad sections
  • nav, footer — remove navigation and footer
  • .sidebar — remove sidebar content

Text Patterns (ignore text)

Text strings or regex patterns to exclude from change detection. Any matching text is stripped before comparing snapshots.

Plain text: Last updated — ignores any line containing this text

Regex: /\d{1,2}:\d{2}\s*(AM|PM)?/i — ignores timestamps like "3:45 PM"

Regex patterns must be wrapped in /pattern/ with optional flags (i for case-insensitive).

Finding selectors with DevTools

  1. Right-click the element you want to monitor in your browser
  2. Click Inspect (or Inspect Element)
  3. In the DevTools Elements panel, look for the element's id or class
  4. Use #id-name for IDs or .class-name for classes

Alternatively, use the element inspector in the Site Spy browser extension — click any element on the page and the selector is applied automatically.

Common examples

GoalFilter typeValue
Monitor only the priceMonitor Only#price or .price
Ignore the sidebarExclude Elements.sidebar
Ignore timestampsText Patterns/\d{1,2}:\d{2}/
Ignore "Last updated" linesText Patterns/last\s+(updated|modified).*/i
Monitor a specific tableMonitor Onlytable.rates
Ignore cookie bannersExclude Elements.cookie-banner, #consent

Smart Filters

Don't want to write selectors manually? Enable Smart Filters and Site Spy will automatically analyze new watches and apply optimal filters using AI.

On this page