# Ad Pixel & Tracking ID Extractor - Meta, GA4, GTM, TikTok (`byusuklu/ad-pixel-tracking-id-extractor`) Actor

Bulk-extract Meta Pixel, GA4, GTM, Google Ads (with conversion labels), TikTok, Pinterest, Snapchat, Microsoft, LinkedIn, X, Reddit, Klaviyo IDs from any website, incl. tags hidden inside GTM. Plus consent check and tracking issues.

- **URL**: https://apify.com/byusuklu/ad-pixel-tracking-id-extractor.md
- **Developed by:** [Hasan U.](https://apify.com/byusuklu) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 website checkeds

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

## Ad Pixel & Tracking ID Extractor: Meta, GA4, GTM, Google Ads, TikTok

Paste a list of websites and get every **ad pixel and analytics ID** each one loads, in one table: Meta Pixel ID, GA4 measurement ID, Google Tag Manager container, Google Ads ID and conversion labels, TikTok, Pinterest, Snapchat, Microsoft Ads (UET), LinkedIn, X, Reddit, Klaviyo, Hotjar and Microsoft Clarity.

It also **opens the site's public Google Tag Manager containers**, so it finds the GA4 and Google Ads tags that are set up inside GTM and never appear in the page code. Most pixel checkers miss these.

On top of the IDs you get the consent setup (cookie banner, Google Consent Mode v2) and a short list of tracking problems: no ad pixel at all, several Meta pixels firing at once, a retired Universal Analytics tag still on the page, or pixels with no consent setup.

**Try it on 10 sites for $0.03.** The free credit on Apify's free plan covers it. Sites that don't load are listed with the reason and never charged.

### Who uses it

- **Agencies and freelancers** find stores that run ads but track badly (duplicate pixels, no conversion tracking, no consent setup) and open the conversation with a concrete fix.
- **Lead generation**: keep only sites that run ads (`onlyWithAdPixels`). A site with a Meta or TikTok pixel is spending on paid traffic.
- **Competitor research**: see which ad networks the leaders in your niche use.
- **Audits and migrations**: check a client's whole site list in one run before you take over the account.

### How to run it

1. Paste website URLs into the input (three are pre-filled, so you can just press Start).
2. Optional: turn on `onlyWithAdPixels`, `onlyWithIssues` or `mustHave` to keep only the sites you care about.
3. Press **Start** and download the table as Excel, CSV or JSON, or call it from the API.

### What you get for each website

| Field | Example |
|---|---|
| Website, name, platform | tentree.com, Tentree, Shopify |
| Tracking found | Meta, Google Analytics 4, Google Tag Manager, Google Ads, TikTok, Klaviyo |
| Ad pixel count | 3 |
| `metaPixelIds` | 233055893553064 |
| `ga4Ids` | G-E4DZXECTM4 |
| `gtmContainerIds` | GTM-WJ5B25K |
| `googleAdsIds` / `googleAdsConversionLabels` | AW-1012196914 / AW-1012196914/AbC-dEf123 |
| `tiktokPixelIds`, `pinterestTagIds`, `snapchatPixelIds` | DAKNGLBC77U8VQAOD3I0 |
| `microsoftUetIds`, `linkedinPartnerIds`, `xPixelIds`, `redditPixelIds` | 187224242 |
| `klaviyoCompanyIds`, `hotjarSiteIds`, `clarityProjectIds` | Mgmu3W |
| `foundInsideGtm` | which IDs came from which GTM container |
| `consentBanner`, `googleConsentMode` | OneTrust · Consent Mode v2 |
| `issues` | "2 different Meta pixel IDs (possible double counting)" |

Example row (JSON):

```json
{
  "url": "https://ridgewallet.com",
  "sitePlatform": "Shopify",
  "trackingPlatforms": ["Google Ads", "TikTok", "Pinterest", "Klaviyo"],
  "adPixelCount": 3,
  "googleAdsIds": ["AW-952762529", "AW-11013736211", "AW-11363115914"],
  "tiktokPixelIds": ["D45RGNBC77UFVI593KB0"],
  "pinterestTagIds": ["2613983108633"],
  "klaviyoCompanyIds": ["x7dPEm"],
  "googleConsentMode": "not detected on page",
  "issues": ["Ad pixels present but no consent banner or Google Consent Mode found in page code"]
}
```

### Where the IDs are read from

- **Page code**: `fbq('init')`, `gtag('config')`, `ttq.load`, `pintrk('load')`, `snaptr('init')`, UET, LinkedIn Insight, X, Reddit, Klaviyo, Hotjar and Clarity snippets.
- **Google Tag Manager**: the public container file `googletagmanager.com/gtm.js?id=GTM-…` (up to 3 containers per site).
- **Shopify Customer Events**: pixels connected through Shopify's own pixel settings (Facebook & Instagram, Google & YouTube, TikTok, Pinterest, Microsoft, Klaviyo apps). They don't appear as normal script tags, so many tools report these stores as "no pixel".

Works on any website: Shopify, WooCommerce, WordPress, BigCommerce, Wix, Squarespace, Webflow or custom builds.

### Filters

- `onlyWithAdPixels`: only sites with at least one ad pixel (Meta, Google Ads, TikTok, Pinterest, Snapchat, Microsoft, LinkedIn, X, Reddit)
- `onlyWithIssues`: only sites where at least one tracking problem was found
- `mustHave`: only sites where every selected ID type was found, e.g. Meta Pixel + Klaviyo
- `scanGtmContainers`: on by default; turn off for a faster homepage-only check

Sites skipped by a filter are not charged.

### Pricing

$3.00 per 1,000 websites checked ($0.003 each). You pay only for sites that load and pass your filters.

| Websites | Cost |
|---|---|
| 100 | $0.30 |
| 1,000 | $3.00 |
| 10,000 | $30.00 |

### Good to know

- The check reads the public homepage, plus one request per GTM container. Nothing behind a login is touched and no personal data is collected.
- Tags that load only on the checkout or thank-you page (Google Ads conversion labels often do) can be missing from the homepage. The Google Ads ID itself is still found.
- Tags that fire only after a visitor accepts cookies may be set up in a way that hides them from the page code. The consent fields show when this is likely.
- "Consent Mode not detected on page" means no `gtag('consent', 'default', …)` call was found in the page code. Consent can still be handled by a platform setting, so treat it as something to check, not as proof.

### FAQ

**Does it work on sites built with React or other JavaScript frameworks?**
Yes for most. Tracking snippets are almost always in the first HTML or the GTM container. A few sites inject every tag from their own bundled JavaScript; those show fewer IDs.

**Can I run it on a schedule?**
Yes. Use Apify Schedules to re-check a list every week and spot when a site adds or removes a pixel.

**Is it legal?**
It reads the same public code every visitor's browser downloads. You are responsible for how you use the results, including any outreach rules in your country.

**Something wrong or missing?**
Open an issue on the Issues tab with the URL and I'll look at it.

### Related actors

- [Shopify Store Leads](https://apify.com/byusuklu/shopify-store-auditor): new US Shopify stores with marketing gaps and business contacts.
- [Shopify Theme & Apps Detector](https://apify.com/byusuklu/shopify-apps-detector): which apps and theme a store runs.
- [Shopify Store Audit](https://apify.com/byusuklu/shopify-store-audit): 27-check CRO & SEO score with ranked fixes.
- [Website Business Contact Finder](https://apify.com/byusuklu/website-business-contact-finder): role-based business emails, contact page, socials and platform for any website.
- [Judge.me Shopify Reviews Scraper](https://apify.com/byusuklu/judge-me-shopify-reviews-scraper): every Judge.me review of a store plus imported-review share, verified share and review velocity.
- [Company Hiring Signals](https://apify.com/byusuklu/company-hiring-signals): open marketing and ecommerce jobs for any company domain, from Greenhouse, Lever, Ashby and more.

# Actor input Schema

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

Domains or URLs, one per line, e.g. mystore.com. Works on any website (Shopify, WooCommerce, WordPress, custom). Sites that don't load are listed free of charge.

## `scanGtmContainers` (type: `boolean`):

Reads each public GTM container (up to 3 per site) to find GA4, Google Ads and other tags that never appear in the page code.

## `onlyWithAdPixels` (type: `boolean`):

Keep sites with Meta, Google Ads, TikTok, Pinterest, Snapchat, Microsoft, LinkedIn, X or Reddit tracking (they are spending on ads). Others are skipped and not charged.

## `onlyWithIssues` (type: `boolean`):

Keep sites with at least one issue: no ad pixel, duplicate pixels, retired Universal Analytics tag, or pixels without any consent setup.

## `mustHave` (type: `array`):

Optional. Keep only sites where every selected ID type was found.

## `includeFailed` (type: `boolean`):

Show unreachable or invalid URLs with the reason (never charged).

## Actor input object example

```json
{
  "urls": [
    "allbirds.com",
    "tentree.com",
    "ridgewallet.com"
  ],
  "scanGtmContainers": true,
  "onlyWithAdPixels": false,
  "onlyWithIssues": false,
  "includeFailed": true
}
```

# Actor output Schema

## `overview` (type: `string`):

One row per checked website (table view).

## `fullResults` (type: `string`):

Every ID type, conversion labels, tags found inside GTM, consent setup and issues.

# 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": [
        "allbirds.com",
        "tentree.com",
        "ridgewallet.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("byusuklu/ad-pixel-tracking-id-extractor").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": [
        "allbirds.com",
        "tentree.com",
        "ridgewallet.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("byusuklu/ad-pixel-tracking-id-extractor").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": [
    "allbirds.com",
    "tentree.com",
    "ridgewallet.com"
  ]
}' |
apify call byusuklu/ad-pixel-tracking-id-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,byusuklu/ad-pixel-tracking-id-extractor"
        }
    }
}
```

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/3lxwQe0o4ASE1sALk/builds/HlfiRbr8nRPFvcwry/openapi.json
