Custom source code search
Find pages whose HTML contains or does not contain a text string or regular expression, such as a missing script, an old tracking code or a disclaimer.
Custom search runs your own rules against the HTML source of every crawled page. Results appear in Pages > Custom Search.
Add a rule
In Settings > Crawl Settings..., under Custom search, add up to 10 rules. Each rule has:
- Name: what the column is called in results.
- Pattern: plain text, or a regular expression.
- Regex: tick when the pattern is a regular expression.
- Mode: report pages that contain the pattern, or pages that don't contain it.
Useful examples
| Goal | Pattern | Mode |
|---|---|---|
| Pages still loading an old CDN script | old-cdn.example.com | Contains |
| Pages missing the cookie banner script | cookiebot.com | Doesn't contain |
| Pages with lorem ipsum left in | lorem ipsum | Contains |
| Product pages without a price in schema | "price"\s*: (regex) | Doesn't contain |
For analytics tags and pixels you do not need custom search: Tracking & Pixels detects 24 tools and their IDs automatically. See Tracking and pixels audit.
Applies to SiteAud!tLint 0.3 and later. Current version 0.7.1.