# Tracking Pixel Detector (`pattonholdings/tracking-pixel-detector`) Actor

Detect 25+ analytics and ad trackers on any URL: GA4, GTM, Meta Pixel, TikTok, LinkedIn, Hotjar, Clarity, Segment, Intercom and more. Returns per-tracker evidence + GDPR/CCPA compliance flags. Use for privacy audits, cookie-banner scoping, competitor stack analysis. Input: url.

- **URL**: https://apify.com/pattonholdings/tracking-pixel-detector.md
- **Developed by:** [Coleton Patton](https://apify.com/pattonholdings) (community)
- **Categories:** Developer tools, Marketing
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Tracking Pixel Detector

Detect every analytics, advertising, session-replay, and chat tracker on a URL. 25+ trackers covered. Returns per-tracker evidence + GDPR/CCPA compliance hints.

### What it detects

#### Analytics

- Google Analytics 4 + Universal
- Google Tag Manager
- Plausible, Fathom, Simple Analytics, Matomo
- PostHog, Amplitude, Mixpanel, Heap, Segment

#### Session replay

- Hotjar, Microsoft Clarity, FullStory, LogRocket

#### Advertising

- Facebook (Meta) Pixel
- TikTok Pixel
- LinkedIn Insight
- Twitter/X Pixel
- Pinterest Tag
- Reddit Pixel
- Google Ads / DoubleClick

#### Chat / marketing automation

- Intercom, Drift, Tawk.to
- HubSpot

### Input

```json
{ "url": "https://example.com" }
```

### Output

```json
{
  "url": "...",
  "trackerCount": 6,
  "detected": [
    {
      "name": "Google Tag Manager",
      "category": "tag-manager",
      "vendor": "Google",
      "evidence": [
        { "type": "script-src", "match": "googletagmanager.com/gtm.js" },
        { "type": "inline-pattern", "match": "/GTM-[A-Z0-9]+/" }
      ]
    },
    {
      "name": "Facebook Pixel",
      "category": "advertising",
      "vendor": "Meta",
      "evidence": [{ "type": "inline-pattern", "match": "/fbq\\s*\\(/" }]
    }
  ],
  "byCategory": { "tag-manager": 1, "advertising": 1, "analytics": 2, "session-replay": 2 },
  "complianceFlags": [
    "Advertising trackers detected — GDPR consent required in EU",
    "Session-replay tools detected — CCPA + GDPR-sensitive data exposure risk"
  ]
}
```

### Use cases

- **Privacy audits** — find every tracker before EU/CA launch
- **GDPR compliance triage** — list what needs to land in your cookie banner
- **Competitive analysis** — see which trackers your competitors run
- **Lead enrichment for privacy consultants** — find prospects running too many trackers

### Pricing

Pay-per-result: **$0.005/URL.** Fetch-only.

### Limitations

This Actor scans raw HTML — trackers loaded via lazy JavaScript injection (after user interaction, after cookie consent, etc.) may not appear. For full network-level coverage, pair with a Playwright-based variant in the same portfolio.

### Author

Built by [Peak Post](https://peakpost.ca). Part of the Privacy Audit Suite.

# Actor input Schema

## `url` (type: `string`):

A single page URL to scan for analytics + advertising trackers.

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

Array of URLs to scan (max 1000).

## Actor input object example

```json
{
  "url": "https://example.com"
}
```

# 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 = {
    "url": "https://example.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pattonholdings/tracking-pixel-detector").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 = { "url": "https://example.com" }

# Run the Actor and wait for it to finish
run = client.actor("pattonholdings/tracking-pixel-detector").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "url": "https://example.com"
}' |
apify call pattonholdings/tracking-pixel-detector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pattonholdings/tracking-pixel-detector",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/KCzOQi8WUfuDNhRZ1/builds/dQVEO2laYqMmGXQbM/openapi.json
