Skip to content

Guide

Capture screenshots without ads or cookie banners

Use ad blocking, banner hiding and selector controls to capture page content without recording consent on a visitor's behalf.

Consent overlays, late-loading ads and layout shifts can obscure the page you intended to capture. Ironfang Render provides separate controls for network requests and page elements so each can be handled appropriately.

Ads and consent banners require different controls. Ads and trackers are blocked as network requests before they load. Consent banners are page elements inserted by scripts the site needs, so Ironfang Render hides them with CSS after page load instead.

Configure blocking controls

curl -X POST https://api.ironfang.uk/renderwolf/v1/screenshot \
  -H "Authorization: Bearer if_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.theguardian.com",
    "block_ads": true,
    "block_cookie_banners": true,
    "full_page": true
  }' \
  --output clean.png

block_ads prevents requests to known ad and tracker networks. block_cookie_banners hides supported consent frameworks and removes their page scroll locks, allowing full-page captures to extend beyond one viewport.

Consent banners are hidden, not accepted

Ironfang Render does not click accept on consent dialogs. An automated click could record consent on the site owner's behalf. Instead, Ironfang Render hides the banner for the capture without making a consent decision.

Remove additional page elements

Use hide_selectors with a list of CSS selectors to hide newsletter pop-ups, chat widgets, app banners and other page elements. Selectors are applied after load, including to elements inserted by scripts.

{
  "url": "https://example.com/article",
  "block_cookie_banners": true,
  "hide_selectors": [".newsletter-modal", "#intercom-container", ".app-banner"]
}

Wait for late-loading content

Use wait_for_selector to hold the render until a specific element appears. The request returns an error if the element does not appear. For pages without a single ready marker, wait_until: "networkidle" waits for network activity to settle.

{
  "url": "https://app.example.com/metrics",
  "wait_for_selector": "#chart-loaded",
  "block_ads": true
}

Blocklist maintenance

Ironfang Render uses focused blocklists to reduce the risk of breaking page content. A weekly canary renders banner-heavy sites against the lists used in production so changes to consent-framework markup can be detected and reviewed.

Next