# Website Tracker & Pixel Scanner: Ad Pixels & GDPR Audit (`bossless/website-tracker-scanner`) Actor

Scan any website for tracking pixels, analytics tags, cookies, and Consent Management Platforms (OneTrust, Cookiebot, etc.). Extracts pixel IDs (Meta, GA4, TikTok, Clarity) and flags trackers fired before consent for privacy audits.

- **URL**: https://apify.com/bossless/website-tracker-scanner.md
- **Developed by:** [Alexander Daskalov](https://apify.com/bossless) (community)
- **Categories:** Developer tools, Automation, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 96.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.50 / 1,000 website scanneds

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

## Website Tracker & Pixel Scanner: Ad Pixels & GDPR Privacy Audit

**Audit any website for third-party tracking pixels, analytics scripts, cookies, and Consent Management Platforms (CMPs).** Run automated privacy and marketing tag audits in seconds: extract exact pixel IDs, identify consent banners, and detect **trackers fired before consent** for GDPR, ePrivacy, and CCPA compliance.

- 🎯 **Pixel ID Extraction**: Automatically extracts account and container IDs for Meta Pixel (`fbq`), Google Analytics 4 (`G-XXX`), Google Tag Manager (`GTM-XXX`), Google Ads (`AW-XXX`), TikTok Pixel, LinkedIn Insight Tag, Microsoft Clarity, Hotjar, and more.
- 🛡️ **Pre-Consent Privacy Audit Wedge**: Inspects pages as a first-time guest without clicking the cookie banner. Instantly flags marketing and analytics trackers that fire before user consent is granted.
- 🍪 **Open Cookie Database Classification**: Categorizes cookies into Functional, Analytics, Marketing, and Security with vendor attribution and retention periods using the verified Open Cookie Database.
- 🚦 **Consent Platform (CMP) Detection**: Automatically identifies 15+ leading Consent Management Platforms including OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast Choice, CookieYes, Complianz, Termly, Civic, and Axeptio.
- 🌐 **Clean Headless Chromium Profile**: Fresh browser environment per audit, stripped of WebRTC leaks, with private network sandboxing to protect your infrastructure.
- 💰 **Predictable Pay-Per-Event Pricing**: No monthly subscriptions or wasted compute hours. Pay only for the websites you actually audit.

***

### What can you do with it?

- **GDPR & Privacy Compliance Auditing**: Automatically verify whether client or partner websites comply with cookie consent laws before user interaction.
- **Competitor MarTech Discovery**: Uncover advertising networks, analytics stacks, and session replay tools used across your industry.
- **Client Marketing Onboarding**: Fast-track tag audits when onboarding new SEO or paid media clients by pulling all live tracking IDs in one scan.
- **Broken Tag & Tag Governance Monitoring**: Catch missing tracking IDs or unintended duplicate container firings across multiple landing pages.
- **Agency Pitch Intelligence**: Generate instant privacy and tag hygiene reports for prospective client audits.

***

### Output Example

Each scanned domain produces a structured JSON dataset record:

```json
{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "status": 200,
  "scanTimestamp": "2026-10-29T05:15:00Z",
  "cmpDetected": {
    "name": "OneTrust",
    "vendor": "OneTrust LLC",
    "foundBy": "script_url",
    "signature": "https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
  },
  "summary": {
    "trackersCount": 3,
    "pixelsCount": 2,
    "cookiesCount": 5,
    "preConsentViolationsCount": 2,
    "thirdPartyRequestsCount": 18,
    "firstPartyRequestsCount": 12
  },
  "trackers": [
    {
      "name": "Google Tag Manager",
      "category": "Tag Management",
      "vendor": "Google LLC",
      "detectedVia": "network",
      "firedBeforeConsent": true,
      "pixelId": "GTM-ABC1234",
      "evidence": "https://www.googletagmanager.com/gtm.js?id=GTM-ABC1234"
    },
    {
      "name": "Meta Pixel",
      "category": "Marketing",
      "vendor": "Meta Platforms, Inc.",
      "detectedVia": "network",
      "firedBeforeConsent": true,
      "pixelId": "123456789012345",
      "evidence": "https://connect.facebook.net/en_US/fbevents.js"
    }
  ],
  "cookies": [
    {
      "name": "_ga",
      "domain": ".example.com",
      "category": "Analytics",
      "vendor": "Google LLC",
      "retention": "2 years",
      "description": "ID used to identify users",
      "firedBeforeConsent": true,
      "isThirdParty": false
    }
  ],
  "scanDurationSecs": 4.8,
  "error": null
}
```

***

### Pricing

This actor uses transparent **Pay-Per-Event (PPE)** pricing:

| Event | Free / Bronze | Silver | Gold / Platinum / Diamond | Description |
| :--- | :---: | :---: | :---: | :--- |
| **Actor start** (`apify-actor-start`) | $0.00005 | $0.00005 | $0.00005 | Charged once per run. Covers container startup. |
| **Website scanned** (`site`) | **$0.0080** | **$0.0072** | **$0.0065** | Full audit per URL (trackers, cookies, IDs & CMP). |

*Unreachable or offline websites succeed with status `null` and a descriptive error message without crashing your batch run.*

***

### Ready-Made Tasks

Get started immediately with pre-configured task presets:

- [GDPR Cookie & Tracker Audit](https://apify.com/bossless/website-tracker-scanner/examples/gdpr-cookie-tracker-audit): Pre-consent compliance scan highlighting marketing trackers fired before cookie consent.
- [Marketing Pixel Auditor](https://apify.com/bossless/website-tracker-scanner/examples/marketing-pixel-auditor): Extract Meta, TikTok, GA4, and LinkedIn IDs for digital marketing tag verification.
- [Competitor Tech Stack Tracker](https://apify.com/bossless/website-tracker-scanner/examples/competitor-tech-stack-tracker): Discover third-party analytics and ad tags across competitor websites.

***

### Use from Code

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("bossless/website-tracker-scanner").call(run_input={
    "urls": [
        "https://example.com",
        "https://apify.com"
    ],
    "maxConcurrency": 2,
    "pageTimeoutSecs": 30,
    "acceptCookies": False,
    "blockMedia": True
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"Site: {item['url']} | Trackers: {item['summary']['trackersCount']} | CMP: {item['cmpDetected']}")
    for tracker in item["trackers"]:
        print(f"  - {tracker['name']} (ID: {tracker['pixelId']}) [{tracker['category']}]")
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/bossless~website-tracker-scanner/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://apify.com"], "maxConcurrency": 1}'
```

***

### FAQ

**Does this actor interact with or click the cookie banner?**\
By default, no. It deliberately audits the site from the perspective of a brand new, first-time visitor to detect what scripts and cookies fire prior to consent. If you enable **Accept Cookies & Re-Audit** (`acceptCookies: true`), it will attempt to click "Accept All" on supported CMPs and record additional firing tags.

**Which tracking IDs can be extracted?**\
It extracts IDs for Google Analytics 4 (`G-XXX`), Google Tag Manager (`GTM-XXX`), Universal Analytics (`UA-XXX`), Google Ads (`AW-XXX`), Meta Pixel, TikTok Pixel, LinkedIn Insight Tag, Microsoft Clarity, Hotjar, and HubSpot, among others.

**How are cookies categorized?**\
Cookies are matched against the Open Cookie Database (licensed under Apache-2.0), providing recognized descriptions, data controllers (vendors), and typical retention periods.

**Is this legal advice?**\
No. This tool provides technical observations of browser network traffic and cookie storage. It does not constitute legal advice regarding GDPR, ePrivacy, or CCPA compliance.

**Is this actor affiliated with any ad platform or CMP vendor?**\
No. This is an independent tool and is not affiliated with, sponsored by, or endorsed by Google, Meta, ByteDance, OneTrust, Cookiebot, or any other mentioned service.

***

### Attribution

This tool includes cookie definitions from the [Open Cookie Database](https://github.com/jkwakman/Open-Cookie-Database) by Jan Kwakman, licensed under the Apache License 2.0.

# Actor input Schema

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

List of website URLs to scan for tracking pixels, analytics scripts, cookies, and consent management banners.

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

Maximum number of browser pages running in parallel (1 to 5).

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

Timeout in seconds for page navigation and network idle stabilization.

## `acceptCookies` (type: `boolean`):

If enabled and a supported consent banner is detected, automatically clicks 'Accept All' to audit post-consent trackers.

## `blockMedia` (type: `boolean`):

Block heavy audio/video streams to accelerate scanning and save bandwidth while preserving full script execution.

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

Optional proxy settings for geo-located audits (e.g., test European GDPR banners vs US CCPA banners).

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://example.com"
  ],
  "maxConcurrency": 2,
  "pageTimeoutSecs": 30,
  "acceptCookies": false,
  "blockMedia": true
}
```

# 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://apify.com",
        "https://example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bossless/website-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": [
        "https://apify.com",
        "https://example.com",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bossless/website-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/mc0m3UnlJ3X3n1SHs/builds/ExKh5EKOLDoLGqwvJ/openapi.json
