Block Options
Configure content blocking to remove ads, trackers, cookie banners, and chat widgets from snapshots.
Options for blocking unwanted content during page capture. These settings are passed in options.block.
Options
| Field | Type | Default | Notes |
|---|---|---|---|
cookieBanners | boolean | false | Block GDPR/cookie consent banners and overlays. |
chats | boolean | false | Block chat widgets (Intercom, Tawk, Drift, etc.). |
ads | boolean | true | Block advertisements using EasyList filters. |
trackers | boolean | true | Block tracking scripts using EasyPrivacy filters. |
Why Block Content?
Blocking unwanted content improves snapshot quality and consistency:
- Cookie banners obscure page content
- Chat widgets add visual noise and can appear in different states
- Advertisements change frequently
- Trackers do not affect page rendering in most cases
Filter Lists
Watchero uses industry-standard filter lists for blocking:
| Option | Filter List | Description |
|---|---|---|
cookieBanners | Custom GDPR list | Targets cookie consent dialogs from OneTrust, CookieBot, TrustArc, and similar providers. |
chats | Custom chat list | Blocks live chat widgets from Intercom, Tawk.to, Drift, Zendesk, LiveChat, and others. |
ads | EasyList | The most popular ad-blocking filter list, maintained by the EasyList community. |
trackers | EasyPrivacy | Comprehensive privacy protection list that blocks tracking scripts and pixels. |
Default Behavior
Ads and trackers are blocked by default to ensure reproducible screenshots. Advertisements and tracking scripts change frequently and can cause visual differences between captures of the same page.
| Option | Default | Reason |
|---|---|---|
ads | true | Ads change frequently and affect layout consistency |
trackers | true | Trackers can inject dynamic content and slow page load |
cookieBanners | false | May be needed for compliance verification |
chats | false | Some users want to capture chat widget state |
To capture the page with all original content, explicitly disable the options:
{
"options": {
"block": {
"cookieBanners": false,
"chats": false,
"ads": false,
"trackers": false
}
}
}Example Request
Block only ads and trackers, but keep cookie banners and chat widgets:
curl -s -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://example.com/"
],
"viewports": [
{
"width": 1280,
"height": 800
}
],
"options": {
"block": {
"cookieBanners": false,
"chats": false,
"ads": true,
"trackers": true
}
}
}' \
"https://api.watchero.io/api/v1/snapshots"Blocking happens at the network level before content is loaded, resulting in faster page captures and more consistent results.