# SiteVerdict — Tracking QA Robot (GA4, Ads, Meta, TikTok) (`siteverdict/siteverdict-tracking-qa-robot`) Actor

Scripted checkout and lead journeys in a real browser that assert your GA4, Google Ads, Meta, TikTok, Snap and LinkedIn conversions fire once, with the right value, currency and event_id, and only after consent. Never submits real payments. Evidence, history, Slack alerts.

- **URL**: https://apify.com/siteverdict/siteverdict-tracking-qa-robot.md
- **Developed by:** [Aman Thakran](https://apify.com/siteverdict) (community)
- **Categories:** Marketing, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Know the moment your conversion tracking breaks

**SiteVerdict Tracking QA Robot** walks through your key journeys — add to basket, checkout, lead form, sign-up — in a real Chromium browser, the way a customer would, and checks that **GA4, Google Ads, Meta Pixel, TikTok, Snap and LinkedIn** fire the events you expect: **once**, **after the right step**, with the **right value, currency, transaction_id and event_id**, and **only with consent**. Schedule it daily and get a Slack alert when a release breaks tracking — before a week of ad spend is optimised on bad data.

- **Never creates fake conversions.** By default every tracking request is captured and answered locally, so your GA4, Ads and Meta accounts never see QA traffic.
- **Never submits a real payment.** A click on "Pay now / Place order / Confirm and pay" stops the journey. It only continues when you allow it **and** the site is verifiably in test mode (e.g. a Stripe `pk_test_` key and no `pk_live_`). Real-looking card numbers are refused; only published test cards are accepted.
- **Evidence for every finding:** step log, screenshots, and a network log of every tracking request (personal data redacted).

### Who it is for

- **Performance-marketing and analytics agencies** that need proof tracking works after every client release.
- **E-commerce and lead-gen teams** running Google Ads / Meta campaigns where a missing or doubled purchase event costs real money.
- **Consent / privacy owners** who need to show that marketing tags stay silent after "Reject all".

### What it checks

| Check | Example finding |
|---|---|
| Missing event | `meta Purchase never fired. Seen for meta: PageView, AddToCart.` |
| Duplicate event | `ga4 purchase fired 2× (expected once) — conversions will be double-counted.` |
| Wrong parameter | `meta Purchase: parameter "currency" "gbp" ≠ "GBP"` |
| Too early | `ga4 add_to_cart fired during step 0, before step 1 (e.g. on page load instead of on the action).` |
| Consent violation | `meta fired 2 request(s) after "Reject all" … Marketing tags need opt-in consent under UK GDPR/PECR.` |
| Consent Mode | GA4/Ads `gcs` decoded: cookieless pings with storage denied are reported as info; granted after Reject is a failure; missing signal is a warning |
| CAPI dedup hint | `meta Purchase has no event_id — if you also send this event server-side (Conversions API), it cannot be deduplicated.` |
| Purchase hygiene | missing value / currency / transaction_id, non-ISO currency, Google Ads 1p-conversion not double-counted |
| Breakage over time | new failures and fixes since the last run (named key-value store) |

### How to write a journey

```json
{
  "name": "Checkout",
  "startUrl": "https://shop.example.com/product/blue-mug",
  "consent": "accept",
  "allowTestPayment": false,
  "steps": [
    { "action": "click", "selector": "button.add-to-cart" },
    { "action": "goto", "url": "/checkout" },
    { "action": "fill", "selector": "#email", "value": "{{email}}" },
    { "action": "click", "selector": "text=Continue to payment" },
    { "action": "click", "selector": "button#pay" }
  ],
  "expectedEvents": [
    { "platform": "ga4", "event": "add_to_cart", "afterStep": 1, "params": { "currency": "GBP", "value": ">0" } },
    { "platform": "ga4", "event": "begin_checkout", "afterStep": 2 },
    { "platform": "meta", "event": "InitiateCheckout", "params": { "eid": "*" } },
    { "platform": "google-ads", "conversionLabel": "AbC-D_efG", "count": "never" }
  ]
}
```

- **Actions:** `goto`, `click`, `fill`, `select`, `check`, `press`, `wait`, `waitForSelector`, `waitForUrl`, `scroll`, `consent` (`choice: accept|reject`), `screenshot`. Selectors are Playwright selectors (CSS, `text=…`, `role=…`).
- **Consent:** `accept` / `reject` click the cookie banner automatically after the first page load (20+ CMPs: OneTrust, Cookiebot, CookieYes, Didomi, Usercentrics, Quantcast, TrustArc, Osano, Complianz, iubenda, Sourcepoint …, plus button-text fallback); `no-interaction` never touches it; `manual` lets your steps do it.
- **Expected events:** `platform`, `event` (GA4 `purchase`, Meta `Purchase`, TikTok `CompletePayment`, Snap `PURCHASE`, LinkedIn conversion id), optional `pixelId`, `conversionLabel` (Google Ads), `afterStep`, `count` (`exactlyOnce` default for conversions, `atLeastOnce`, `never`) and `params` (`*` present, `number`, `>0`, `currency`, `/regex/`, or an exact value).
- **Test data:** `{{email}}` → `qa+<run>@example.com`, `{{name}}`, `{{phone}}` (Ofcom drama range), `{{testCard}}` (4242 4242 4242 4242).

When a payment step is stopped, events up to that point are still verified and the result says what was not tested. To test the purchase event end-to-end, put the site in its payment provider's test mode and set `allowTestPayment: true`.

### Output

- Dataset: one row per journey — verdict, findings, step log, network log, consent state (from the CMP cookie), payment mode, new failures / fixes. Views: *Journeys*, *Findings*, *Network log*.
- Key-value store: `REPORT.html` (evidence report, light/dark), `FINDINGS.csv`, screenshots `shot-*.jpg`, `OUTPUT` (agent-ready summary).
- Alerts: Slack and/or JSON webhook when a journey starts failing or is fixed.

### Pricing

Pay-per-event: **$0.04 per journey tested** (completed or safely stopped before payment), **$0.01 per alert delivered**. Journeys skipped by robots.txt, blocked, or that could not open their start page are free; sample mode is free. If your maximum total charge runs out, the remaining journeys are listed as "not tested (max total charge reached)" and are free; a breakage alert is sent only while the budget can still pay for it, otherwise the run output says it was not sent.

**Pre-filled form / no authorisation:** the robot never opens a real site without the "I own this site or am authorised to test it" tick. If the tick is off and every journey starts on a reserved example name such as `www.example.com` (as in the pre-filled form), the Actor runs the sample instead of failing: synthetic journeys, no browser, every row has `isSampleData: true`, the status message starts with **SAMPLE DATA**, monitoring history and alerts are skipped, nothing is charged.
Examples: 5 journeys daily ≈ $6/month; 20 journeys weekly ≈ $3.50/month.

### FAQ

**Will this pollute my analytics?** No by default — requests are captured and answered inside the browser. Turn on *Let tracking requests reach the vendors* only with test properties / Meta test event codes.

**Does it test server-side (CAPI / sGTM) events?** It sees what the browser sends, including first-party sGTM `/g/collect` endpoints, and flags missing `event_id` for server/browser deduplication. Server-to-server calls are not visible to a browser.

**Snap and LinkedIn?** Detected from their public tag endpoints (`tr.snapchat.com/p`, `px.ads.linkedin.com/collect` / `/wa`). Their parameter names are not formally documented, so treat Snap/LinkedIn parameter checks as best-effort.

**Robots.txt?** Journeys are skipped if robots.txt disallows the start URL for `SiteVerdictBot`. For your own site, tick *Ignore robots.txt (own site only)*.

### Limits

20 journeys × 50 steps per run; 3–60 s per step, up to 10 min per journey. Payment iframes (e.g. Stripe Elements) are not filled. Bot protection / CAPTCHAs are not bypassed — allow-list the robot or test a staging site. One browser, journeys run one after another.

### Sources & compliance

- Tag endpoints and parameters: Google Analytics 4 Measurement Protocol / gtag request format, Google Consent Mode (`gcs`/`gcd`), Google Ads conversion tag, Meta Pixel, TikTok Pixel, Snap Pixel, LinkedIn Insight Tag public documentation (read 11 Oct 2026). Detection runs only in your browser session; nothing is scraped from these platforms.
- Only sites you own or are authorised to test (`iAmAuthorised` is required); robots.txt respected by default; honest user agent `… SiteVerdict-TrackingQA/1.1.0 (+https://webrevenuescan.com)`; SSRF guard on every request, and all browser traffic goes through a local DNS-pinned checking proxy (private, internal and cloud-metadata addresses refused at connect time, so DNS rebinding cannot switch the target); off-site navigation blocked.
- Personal data: test data is fictitious; personal identifiers found in tag requests (emails, phones, client/user ids, advanced-matching fields) are redacted before storage. UK GDPR/PECR: the consent checks are technical signals, **not legal advice**.
- CMP signatures adapted from SiteVerdict's Consent Mode v2 & Tracking Auditor.

Made by SiteVerdict — https://webrevenuescan.com.

# Changelog

This Actor's version history is a separate document: https://apify.com/siteverdict/siteverdict-tracking-qa-robot/changelog.md

# Actor input Schema

## `sampleMode` (type: `boolean`):

Show the full output on a synthetic checkout journey without opening a browser. Nothing is charged. If the authorisation tick is off and every journey starts on a reserved example name (e.g. www.example.com), the run uses sample mode automatically and every row is marked isSampleData: true. Real sites always need the tick.

## `journeys` (type: `array`):

One object per journey: <code>name</code>, <code>startUrl</code>, <code>consent</code> (accept | reject | no-interaction | manual), <code>steps</code> \[{action: goto|click|fill|select|check|press|wait|waitForSelector|waitForUrl|scroll|consent|screenshot, selector, value, url, key, ms, choice, optional}], <code>expectedEvents</code> \[{platform: ga4|google-ads|meta|tiktok|snap|linkedin, event, pixelId, conversionLabel, afterStep, count: exactlyOnce|atLeastOnce|never, params: {name: '\*'|'number'|'>0'|'currency'|'/regex/'|exact}}], optional <code>allowedDomains</code> and <code>allowTestPayment</code>. Fill values may use {{email}}, {{name}}, {{phone}}, {{testCard}}. Max 20 journeys × 50 steps.

## `iAmAuthorised` (type: `boolean`):

Required for live runs. The robot clicks and fills forms on the pages you list — only test sites you are responsible for.

## `ignoreRobotsForOwnSite` (type: `boolean`):

By default a journey is skipped if robots.txt disallows its start URL for SiteVerdictBot. Checkout paths are often disallowed for crawlers; tick this only for your own site.

## `consentRequired` (type: `boolean`):

Treat marketing tags before opt-in (and GA4 with analytics storage granted after Reject) as violations. Untick for regions without opt-in rules.

## `sendHitsToVendors` (type: `boolean`):

Off (default): tracking requests are captured and answered locally, so QA runs never create fake conversions in GA4 / Ads / Meta. On: requests are sent for real (use with test properties / test event codes).

## `screenshots` (type: `string`):

Evidence screenshots saved to the key-value store (JPEG).

## `stepTimeoutSecs` (type: `integer`):

3–60.

## `journeyTimeoutSecs` (type: `integer`):

30–600.

## `locale` (type: `string`):

e.g. en-GB, en-US, de-DE.

## `monitoring` (type: `boolean`):

Store each journey's result in a named key-value store and report new failures and fixes since the last run. Schedule the Actor (e.g. daily).

## `stateStoreName` (type: `string`):

Named key-value store for the history.

## `slackWebhookUrl` (type: `string`):

HTTPS only. Alert when tracking breaks (new failures) or is fixed.

## `webhookUrl` (type: `string`):

HTTPS only. Receives the JSON alert payload.

## `alertOnlyOnChange` (type: `boolean`):

Off = alert after every run that has a failing journey.

## Actor input object example

```json
{
  "sampleMode": false,
  "journeys": [
    {
      "name": "Lead form (accept all)",
      "startUrl": "https://www.example.com/contact",
      "consent": "accept",
      "steps": [
        {
          "action": "fill",
          "selector": "input[name=email]",
          "value": "{{email}}"
        },
        {
          "action": "fill",
          "selector": "input[name=name]",
          "value": "{{name}}"
        },
        {
          "action": "click",
          "selector": "button[type=submit]"
        },
        {
          "action": "waitForUrl",
          "url": "/thank"
        }
      ],
      "expectedEvents": [
        {
          "platform": "ga4",
          "event": "generate_lead",
          "afterStep": 3
        },
        {
          "platform": "meta",
          "event": "Lead",
          "afterStep": 3,
          "params": {
            "eid": "*"
          }
        },
        {
          "platform": "google-ads",
          "conversionLabel": "YOUR_LABEL"
        }
      ]
    },
    {
      "name": "Home page (reject all)",
      "startUrl": "https://www.example.com/",
      "consent": "reject",
      "steps": [
        {
          "action": "scroll"
        }
      ],
      "expectedEvents": []
    }
  ],
  "iAmAuthorised": false,
  "ignoreRobotsForOwnSite": false,
  "consentRequired": true,
  "sendHitsToVendors": false,
  "screenshots": "failures",
  "stepTimeoutSecs": 15,
  "journeyTimeoutSecs": 180,
  "locale": "en-GB",
  "monitoring": true,
  "stateStoreName": "siteverdict-tracking-qa",
  "alertOnlyOnChange": true
}
```

# Actor output Schema

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

No description

## `output` (type: `string`):

No description

## `files` (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 = {
    "journeys": [
        {
            "name": "Lead form (accept all)",
            "startUrl": "https://www.example.com/contact",
            "consent": "accept",
            "steps": [
                {
                    "action": "fill",
                    "selector": "input[name=email]",
                    "value": "{{email}}"
                },
                {
                    "action": "fill",
                    "selector": "input[name=name]",
                    "value": "{{name}}"
                },
                {
                    "action": "click",
                    "selector": "button[type=submit]"
                },
                {
                    "action": "waitForUrl",
                    "url": "/thank"
                }
            ],
            "expectedEvents": [
                {
                    "platform": "ga4",
                    "event": "generate_lead",
                    "afterStep": 3
                },
                {
                    "platform": "meta",
                    "event": "Lead",
                    "afterStep": 3,
                    "params": {
                        "eid": "*"
                    }
                },
                {
                    "platform": "google-ads",
                    "conversionLabel": "YOUR_LABEL"
                }
            ]
        },
        {
            "name": "Home page (reject all)",
            "startUrl": "https://www.example.com/",
            "consent": "reject",
            "steps": [
                {
                    "action": "scroll"
                }
            ],
            "expectedEvents": []
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("siteverdict/siteverdict-tracking-qa-robot").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 = { "journeys": [
        {
            "name": "Lead form (accept all)",
            "startUrl": "https://www.example.com/contact",
            "consent": "accept",
            "steps": [
                {
                    "action": "fill",
                    "selector": "input[name=email]",
                    "value": "{{email}}",
                },
                {
                    "action": "fill",
                    "selector": "input[name=name]",
                    "value": "{{name}}",
                },
                {
                    "action": "click",
                    "selector": "button[type=submit]",
                },
                {
                    "action": "waitForUrl",
                    "url": "/thank",
                },
            ],
            "expectedEvents": [
                {
                    "platform": "ga4",
                    "event": "generate_lead",
                    "afterStep": 3,
                },
                {
                    "platform": "meta",
                    "event": "Lead",
                    "afterStep": 3,
                    "params": { "eid": "*" },
                },
                {
                    "platform": "google-ads",
                    "conversionLabel": "YOUR_LABEL",
                },
            ],
        },
        {
            "name": "Home page (reject all)",
            "startUrl": "https://www.example.com/",
            "consent": "reject",
            "steps": [{ "action": "scroll" }],
            "expectedEvents": [],
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("siteverdict/siteverdict-tracking-qa-robot").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 '{
  "journeys": [
    {
      "name": "Lead form (accept all)",
      "startUrl": "https://www.example.com/contact",
      "consent": "accept",
      "steps": [
        {
          "action": "fill",
          "selector": "input[name=email]",
          "value": "{{email}}"
        },
        {
          "action": "fill",
          "selector": "input[name=name]",
          "value": "{{name}}"
        },
        {
          "action": "click",
          "selector": "button[type=submit]"
        },
        {
          "action": "waitForUrl",
          "url": "/thank"
        }
      ],
      "expectedEvents": [
        {
          "platform": "ga4",
          "event": "generate_lead",
          "afterStep": 3
        },
        {
          "platform": "meta",
          "event": "Lead",
          "afterStep": 3,
          "params": {
            "eid": "*"
          }
        },
        {
          "platform": "google-ads",
          "conversionLabel": "YOUR_LABEL"
        }
      ]
    },
    {
      "name": "Home page (reject all)",
      "startUrl": "https://www.example.com/",
      "consent": "reject",
      "steps": [
        {
          "action": "scroll"
        }
      ],
      "expectedEvents": []
    }
  ]
}' |
apify call siteverdict/siteverdict-tracking-qa-robot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,siteverdict/siteverdict-tracking-qa-robot"
        }
    }
}
```

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/wcw0Fy0sNVAjLhL44/builds/GSJxnwdiOs5Bxd2Qk/openapi.json
