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 sectionsnav, 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
- Right-click the element you want to monitor in your browser
- Click Inspect (or Inspect Element)
- In the DevTools Elements panel, look for the element's
idorclass - Use
#id-namefor IDs or.class-namefor 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
| Goal | Filter type | Value |
|---|---|---|
| Monitor only the price | Monitor Only | #price or .price |
| Ignore the sidebar | Exclude Elements | .sidebar |
| Ignore timestamps | Text Patterns | /\d{1,2}:\d{2}/ |
| Ignore "Last updated" lines | Text Patterns | /last\s+(updated|modified).*/i |
| Monitor a specific table | Monitor Only | table.rates |
| Ignore cookie banners | Exclude 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.