# Cookie & Tracker Consent Checker – GDPR/TDDDG Pre-Consent Scan (`fast_data_asap/cookie-consent-tracker-checker`) Actor

Load sites in real headless Chromium, click nothing, and see what runs before consent: cookies (1st/3rd-party, lifetime, flags), requests to Google Analytics, Meta Pixel, TikTok, Hotjar, Clarity & 70+ trackers, detected CMP (Cookiebot, OneTrust, Usercentrics...) and a risk level.

- **URL**: https://apify.com/fast_data_asap/cookie-consent-tracker-checker.md
- **Developed by:** [Fast Data](https://apify.com/fast_data_asap) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 page checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Cookie & Tracker Consent Checker (GDPR / TDDDG pre-consent scan)

See **what a website does before the visitor has agreed to anything**. For every URL the actor opens the page in a **real headless Chromium** with a fresh, empty profile, **clicks nothing**, waits for tag managers to fire, and records:

- every **cookie** set without interaction: name, domain, **first- or third-party**, **lifetime in days** or session, `Secure`, `HttpOnly`, `SameSite`, and whether it is a **known tracking cookie** (`_ga`, `_fbp`, `IDE`, `_clck`, `_hj…`, `MUID`, `_uet…`, `li_sugr`, …). **Cookie values are never returned.**
- every **network request to a known tracker**: Google Analytics, Google Tag Manager, DoubleClick / Google Ads, Meta Pixel, TikTok Pixel, LinkedIn Insight Tag, Hotjar, Microsoft Clarity, Bing UET, Criteo, Pinterest, Snap, X / Twitter, Taboola, Outbrain, Matomo Cloud, Amplitude, Mixpanel, Segment, HubSpot, Xandr, The Trade Desk, PubMatic, etracker, INFOnline and more (70+ domains), each with a category: `analytics`, `ads`, `social`, `session-recording`, `tag-manager`.
- the **consent management platform (CMP)**: Cookiebot, OneTrust, Usercentrics, Borlabs Cookie, Didomi, consentmanager, Klaro, CookieYes, Complianz, iubenda, Quantcast Choice, Sourcepoint, TrustArc, Osano, Axeptio, CookieFirst, Termly, Real Cookie Banner and others, detected from script URLs and the DOM, plus whether the IAB **TCF API** (`__tcfapi`) or **GPP API** is present.
- a **risk level** (`none` / `low` / `high`) with the reasons and a one-sentence **summary**.

> **Disclaimer:** this actor delivers a **technical finding, not legal advice**. Whether a given cookie or request is permitted depends on its purpose, the legal basis and the specific case. Have results assessed by a qualified person before drawing legal conclusions.

### Who it is for

- **Privacy / data protection consultants and agencies** screening many client sites at once
- **Web agencies and developers** checking that tag managers really wait for consent after a launch or CMP change
- **Compliance and marketing-ops teams** monitoring their own sites (schedule it daily or weekly)
- **Researchers and journalists** measuring tracking before consent across many websites

### Why this actor

- **Real browser, real behaviour**: JavaScript runs, tag managers fire, cookies set by scripts and third-party pixels are captured — not just `Set-Cookie` headers of the HTML.
- **Strictly no interaction**: no banner clicks, no scrolling, no login. What you see is the true pre-consent state.
- **Transparent risk rule** (below) instead of an opaque score, with `riskReasons` for every page.
- **Flat, AI-friendly output**: `trackersBeforeConsent`, `thirdPartyCookiesBeforeConsent`, `cmpName`, `riskLevel`, `summary` are ready for spreadsheets, dashboards and LLM agents.
- **Subpages**: `maxPagesPerSite` also checks same-site links from the start page, each in its own fresh profile.
- **Fair**: you pay only for pages that were checked. Blocked pages (HTTP 4xx/5xx, bot-protection challenge) are returned with `status: "error"` and are free. The actor never tries to bypass bot protection.

### Risk rule

| Level | When |
|---|---|
| `high` | A tracker of category **ads**, **social** or **session-recording** was contacted, **or** a known tracking / identifier cookie (e.g. `_ga`, `_fbp`, `IDE`, `_clck`) was set before consent. |
| `low` | Only **analytics** / **tag-manager** requests without identifier cookies, **or** third-party cookies of unknown purpose. |
| `none` | No known tracker requests, no known tracking cookies, no third-party cookies. |

### Visitor location matters

Many CMPs show a banner and block tags **only for visitors from certain regions**. By default the actor runs from the Apify server location (usually the USA), so a site may load all trackers for that visitor and behave differently for EU visitors. To see what an **EU visitor** gets, set *Proxy configuration* to Apify Proxy with an EU country (e.g. `DE`). The browser always uses locale `de-DE` and time zone `Europe/Berlin`.

### Input example

```json
{
  "urls": ["https://www.cookiebot.com/en/", "https://www.hotjar.com/"],
  "maxPagesPerSite": 2,
  "waitAfterLoadSecs": 4,
  "includeCookieList": false,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyCountry": "DE" }
}
```

| Field | Default | Meaning |
|---|---|---|
| `urls` | 2 sample sites | Pages to check |
| `maxPagesPerSite` | 1 | 1 = only the given URL; more = also same-site links found on it |
| `waitAfterLoadSecs` | 4 | Extra wait after the load event for delayed tags |
| `includeCookieList` | true | Add the full cookie list (without values) to each item |
| `pageTimeoutSecs` | 30 | Navigation timeout |
| `maxConcurrency` | 2 | Pages in parallel (about 300 MB memory each) |
| `proxyConfiguration` | off | Optional, e.g. Apify Proxy with country `DE` |

### Output example

Real result from a test run (Apify server in the USA, no proxy), shortened:

```json
{
  "url": "https://www.hotjar.com/",
  "finalUrl": "https://contentsquare.com/...",
  "status": "ok",
  "riskLevel": "high",
  "riskReasons": ["requests to ads/session-recording/social trackers before consent", "20 known tracking cookie(s) set before consent"],
  "cmpDetected": true,
  "cmpName": "OneTrust",
  "tcfApiPresent": false,
  "consentBannerLikelyVisible": true,
  "trackersBeforeConsent": ["Google DoubleClick", "Contentsquare", "Google Tag Manager", "LinkedIn Insight Tag", "Hotjar", "Microsoft Advertising (Bing UET)", "Google Ads", "Google Analytics", "Meta Pixel", "Meta / Facebook", "Reddit Pixel"],
  "trackerCategories": ["ads", "analytics", "session-recording", "social", "tag-manager"],
  "cookiesBeforeConsent": 62,
  "firstPartyCookiesBeforeConsent": 37,
  "thirdPartyCookiesBeforeConsent": 25,
  "trackingCookiesBeforeConsent": ["IDE (Google DoubleClick)", "MUID (Microsoft Advertising)", "_fbp (Meta Pixel)", "_ga (Google Analytics)", "_gcl_au (Google Ads)", "_hjSession_3279672 (Hotjar)", "li_sugr (LinkedIn)", "..."],
  "summary": "Risk HIGH: 11 tracker(s) contacted before consent (Google DoubleClick, Contentsquare, Google Tag Manager, LinkedIn Insight Tag, Hotjar, Microsoft Advertising (Bing UET), ...); 62 cookie(s) set without interaction, 25 third-party, 20 known tracking cookie(s); CMP detected: OneTrust."
}
```

A clean page from the same tests (`https://www.wikipedia.org/`): `riskLevel: "none"`, 0 trackers, 5 first-party cookies, 0 third-party cookies, no CMP.

With `includeCookieList` each item also has `cookies`:

```json
{ "name": "WMF-Uniq", "domain": "wikipedia.org", "party": "first-party", "lifetimeDays": 364.5, "session": false, "secure": true, "httpOnly": true, "sameSite": "None", "knownTracker": null }
```

Other fields: `trackerDetails` (vendor, category, domains, request count), `trackerRequestCount`, `totalRequests`, `thirdPartyDomainCount`, `thirdPartyDomains`, `gppApiPresent`, `pageTitle`, `httpStatus`, `loadSeconds`, `checkedAt`, `error`.

### Limits

- Tracker and CMP detection uses an embedded list of well-known domains, script names and DOM markers. Unknown or self-hosted trackers (e.g. server-side tagging on a first-party subdomain) may not be recognised; check `thirdPartyDomains` and the cookie list for those.
- The actor does not interact with banners, so it does not test whether "Reject" works.
- Sites with bot protection may return an error item instead of a result; no bypass is attempted.
- No personal data is collected; cookie values are never stored.

### Pricing

**$0.004 per page checked** ($4 per 1,000 pages), charged with the `page` event. Failed or blocked pages are free. The default 2-page test finishes in about 15 seconds at 1 GB memory.

### API, n8n and MCP usage

**API** (sync, returns dataset items):

```bash
curl -X POST "https://api.apify.com/v2/acts/fast_data_asap~cookie-consent-tracker-checker/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://www.example.com/"], "maxPagesPerSite": 3}'
```

**n8n / Make / Zapier**: use the Apify node or app, pick `fast_data_asap/cookie-consent-tracker-checker`, pass the same JSON input and read the dataset items. Example: schedule it weekly for your sites and send an alert when `riskLevel` is `high`.

**MCP (Claude, Cursor and other AI agents)**: add the server
`https://mcp.apify.com?tools=fast_data_asap/cookie-consent-tracker-checker`
and ask, for example: "Check these 10 shop homepages for trackers and third-party cookies before consent and list which CMP each one uses."

# Actor input Schema

## `urls` (type: `array`):

Pages to check. Each page is loaded in a fresh, empty browser profile and nothing is clicked, so everything recorded happened BEFORE any consent.

## `maxPagesPerSite` (type: `integer`):

1 = only the given URL. Higher values also check same-site links found on that page (each in its own fresh browser profile).

## `waitAfterLoadSecs` (type: `integer`):

Extra time after the load event so that tag managers and delayed trackers can fire.

## `includeCookieList` (type: `boolean`):

Adds every cookie (name, domain, party, lifetime, Secure/HttpOnly/SameSite) to each page item. Cookie values are never returned.

## `pageTimeoutSecs` (type: `integer`):

Navigation timeout per page.

## `maxConcurrency` (type: `integer`):

How many pages are loaded at the same time. Each needs roughly 250-400 MB memory.

## `proxyConfiguration` (type: `object`):

Optional. Many consent banners behave differently by visitor country. To see what an EU visitor gets, use Apify Proxy with an EU country (e.g. DE). The default runs from the Apify server location (usually USA).

## Actor input object example

```json
{
  "urls": [
    "https://www.wikipedia.org/",
    "https://www.python.org/"
  ],
  "maxPagesPerSite": 1,
  "waitAfterLoadSecs": 4,
  "includeCookieList": true,
  "pageTimeoutSecs": 30,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.wikipedia.org/",
        "https://www.python.org/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fast_data_asap/cookie-consent-tracker-checker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": [
        "https://www.wikipedia.org/",
        "https://www.python.org/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("fast_data_asap/cookie-consent-tracker-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.wikipedia.org/",
    "https://www.python.org/"
  ]
}' |
apify call fast_data_asap/cookie-consent-tracker-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fast_data_asap/cookie-consent-tracker-checker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hvXtrFLrrA0lRtO2Q/builds/NgRCg6wd3nD213DPs/openapi.json
