# Cookie and Tracker Scanner: cookies and tags before consent (`examsens.ai/cookie-tracker-scanner`) Actor

Loads each page in a headless browser without accepting cookies and lists the cookies set, the third party requests made and the tag, tracker and consent vendors detected, with an optional comparison after clicking accept.

- **URL**: https://apify.com/examsens.ai/cookie-tracker-scanner.md
- **Developed by:** [Ed Rayyis](https://apify.com/examsens.ai) (community)
- **Categories:** Developer tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.00 / 1,000 url scanneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 and Tracker Scanner: cookies and tags before consent

Give it a list of web pages. It opens each one in a fresh headless Chrome, with no stored cookies, and does not touch the cookie banner. Then it tells you what the page did before the visitor said yes: every cookie set, every third party domain the page called, and the analytics, advertising, session replay, marketing and consent vendors behind them.

Turn on the accept comparison and it then clicks the banner's accept button and lists what was added after consent: new cookies, new third party domains and new vendors.

### What it detects

- Cookies: name, domain, path, expiry (or `session`), `HttpOnly`, `Secure`, `SameSite`, whether it is first or third party, and the vendor its name belongs to. Cookie values are never read into the output.
- Requests: the total number, the third party requests, and each third party domain with its request count. First and third party are decided by the registrable domain, using the public suffix list, so `static.example.co.uk` counts as the same site as `www.example.co.uk`.
- Vendors: a built in list of 80 vendors matched by the hosts their scripts and beacons load from and the cookie names they set. It covers analytics (such as Google Analytics, Adobe Analytics, Segment, Amplitude), advertising pixels (such as Meta Pixel, Google Ads, LinkedIn Insight Tag, TikTok Pixel, Microsoft Advertising, The Trade Desk), session replay (Hotjar, Microsoft Clarity, FullStory), marketing automation (HubSpot, Marketo, Pardot, Klaviyo), tag managers, chat widgets, and 13 consent managers (OneTrust, Cookiebot, Usercentrics, TrustArc, Didomi, Sourcepoint and others). Each vendor comes with the evidence: the requests and cookie names that matched.

### The accept click

The actor first looks for the accept buttons of known consent managers, such as OneTrust and Cookiebot, then for any visible button or link labeled Accept, Accept all, Accept additional cookies, Allow all, I agree, Got it and similar wording. It records which button it clicked. When it finds none, `afterAccept.clicked` is `false` with a note, and the rest of the result still stands.

### Input

- Pages to scan (required)
- Compare after clicking accept (default off)
- Wait after load (default 5 seconds), applied again after clicking accept
- Page load timeout (default 45 seconds)

### Output

Dataset: one item per page with `url`, `ok`, `finalUrl`, `httpStatus`, `title`, `firstPartySite`, `cookieCount`, `thirdPartyCookieCount`, `requestCount`, `thirdPartyRequestCount`, `thirdPartyDomainCount`, `thirdPartyDomains`, `cookies`, `vendors` (each with `name`, `category` and `evidence`), `trackingVendors` (vendors in the analytics, advertising, session replay, marketing and testing categories), `consentManagers` and `scannedAt`.

With the accept comparison: `afterAccept` with `clicked`, `method`, the `selector` or `buttonText` used, `cookieCount` and `requestCount` after consent, `newCookies`, `newThirdPartyDomains` and `newVendors`.

A page that cannot be loaded gets `ok: false` and an `error`, and the rest of the run carries on. Export as JSON, CSV or Excel, or read it over the API.

### Pricing

Pay per event: one event per page scanned, with or without the accept comparison. A page that fails is not charged. The run stops when it reaches the maximum charge you set.

### Scope and conduct

Only the pages you list are opened, one at a time, each in a fresh browser. The actor clicks nothing except the accept button, and only when you turn the comparison on. It does not log in anywhere, fill in forms, or collect personal data, and cookie values stay out of the results. The result describes what the browser saw on one visit from the actor's location. It is a technical scan, not legal advice.

### Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

# Actor input Schema

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

Web pages to load. Each one is opened in a fresh browser with no stored cookies.

## `compareAfterAccept` (type: `boolean`):

After the first scan, click the cookie banner's accept button and list the cookies, third party domains and vendors added after consent.

## `waitSecs` (type: `integer`):

Time to let tags fire after the page has loaded, and again after clicking accept.

## `timeoutSecs` (type: `integer`):

Give up on a page that has not loaded after this many seconds.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com"
    }
  ],
  "compareAfterAccept": false,
  "waitSecs": 5,
  "timeoutSecs": 45
}
```

# 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": [
        {
            "url": "https://apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("examsens.ai/cookie-tracker-scanner").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": [{ "url": "https://apify.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("examsens.ai/cookie-tracker-scanner").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": [
    {
      "url": "https://apify.com"
    }
  ]
}' |
apify call examsens.ai/cookie-tracker-scanner --silent --output-dataset

```

## MCP server setup

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

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/YD5wDqhukuCw8n6LB/builds/tajLIsnSM2odkKzeN/openapi.json
