Install Node.js
Install a current Node.js LTS release from nodejs.org. Then open Terminal on macOS or PowerShell on Windows and confirm it works with node --version and npm --version.
Measure how quickly a website's consent banner loads and appears, on matched desktop and mobile test runs.
Use it when you want to see what a visitor sees from a consent banner.
In one controlled test, DataGrail's standard banner reached the visitor with a shorter chain of requests, a smaller download and no render-blocking request.
| Measure | DataGrail | Alternative |
|---|---|---|
| Requests | 1 | 15 |
| Download size | 46.8 KB | 711 KB |
| Chain depth to banner | 1 | 4 |
| Render-blocking requests | 0 | 1 |
| Banner visible (mobile) | 1.8 s | 7.1 s |
| Banner visible (desktop) | 1.4 s | 4.0 s |
| First contentful paint (mobile) | 200 ms | 1.6 s |
Measured 2026-10-24 in a controlled test on replica pages, EU visitor, simulated slow mobile profile, medians of interleaved cold loads. Live sites and your own results will differ.
The desktop banner time was measured on the test machine's own network, not the simulated mobile profile.
Give it a public website URL. It loads the site in a fresh local browser, several times, on a desktop profile and a mobile profile, and records how the consent banner behaves.
Not detected. If a run is blocked, it says Not measured. Neither is ever reported as zero.A comparison against a DataGrail implementation needs an approved benchmark, and the skill applies a quality gate before it will produce a claim that one banner is faster than another.
One folder holds SKILL.md, a methodology reference and the local Playwright script that runs the test. Download the .zip and follow the install steps below.
consent-banner-speed-test/
SKILL.md # Skill entry point the agent reads first
package.json # Playwright dependency for the runner
pnpm-lock.yaml # Lockfile
agents/
openai.yaml # Codex display name and default prompt
references/
methodology.md # Quality gate and how to read a comparison
scripts/
audit.cjs # The local Playwright runner
assets/
DataGrail logos (SVG) # Used in the share image
---
name: consent-banner-speed-test
description: Audit a live website’s consent banner against an approved DataGrail implementation on matched desktop and mobile runs, identify the likely CMP and consent footprint, apply publication-quality gates, and generate detailed HTML/JSON plus a branded PNG summary. Use for consent-banner speed tests, CMP comparisons, cookie-banner diagnostics, and DataGrail competitive evidence. Do not use for legal compliance conclusions or claims that have not passed the included quality gate.
---
# Consent Banner Speed Test
Measure what a visitor actually experiences. Preserve every result internally, but generate an external comparison claim only when the evidence passes the quality gate.
## Comparison input
Accept one public target URL. Compare it with one DataGrail implementation that the user or DataGrail team has approved as the benchmark.
Use the environment variable `DG_CONSENT_BASELINE` in `Label|URL` form when the environment has an approved default. Otherwise ask for the approved benchmark URL before running a competitive comparison. Do not silently use a vendor marketing site or pick a customer merely because its logo appears on a customer page.
Default comparison conditions:
- five fresh-browser runs per URL and device
- desktop and mobile profiles
- a 15-second banner-detection window
- the user's current locale and timezone when known
- one region disclosed in the report
- balanced sequential order so the same URL is not always tested first
## Run the comparison
Use [scripts/audit.cjs](scripts/audit.cjs). It needs Node.js, Playwright, and a Chromium-compatible browser. First use the skill's local `node_modules/playwright` when present. Otherwise, in Codex desktop call `load_workspace_dependencies` and use the bundled Node.js packages. Then run:
```bash
NODE_PATH="<node_modules>" "<node>" scripts/audit.cjs
--target "Target site|https://example.com"
--baseline "Approved DataGrail benchmark|https://approved.example"
--baseline-approved
--region-label "California, US"
--output-dir "<absolute-output-directory>"
```
Run the audit from the local command environment. Do not use the in-app browser, computer-use browser, `web.open`, or a personal browser as the measurement surface. Those surfaces may return `ERR_BLOCKED_BY_ADMINISTRATOR` even when the website is reachable and the Playwright runner works.
If the local runner reports a navigation or security-page block, preserve that first result and perform one diagnostic check with an ordinary HTTP HEAD request. A successful HEAD request does not count as a measurement; it only distinguishes a browser-surface restriction from a site or network block. When full local Chrome is available, rerun the entire matched session once with `--headed` and an explicit `--chrome-path`, keeping every other condition unchanged. Use the complete replacement session only if no tested profile returns a block page. If the headed retry is also blocked, keep the result as blocked and do not substitute inferred data.
`--baseline-approved` means the benchmark is approved for external comparison use. It does not mean the resulting claim is approved. The script still applies the evidence gate.
Use `--help` for all options. Without a baseline, repeatable `--target` values still run a neutral multi-site diagnostic with three runs per device.
## Outputs
Keep the generated files together:
- `consent-speed-share.png`: concise DataGrail-branded result image, including a clear blocked or inconclusive state
- `consent-speed-report.html`: detailed diagnostic report
- `consent-speed-report.png`: full-page rendering of the detailed report
- `consent-speed-audit.json`: raw measurements, comparisons, and quality-gate status
- first-run screenshots for every URL/device pair
The share image must still be produced when access is blocked or no banner is detected. Missing measurements are labeled `Not detected` or `Not measured`, never `0 ms`.
## Publication quality gate
Read [references/methodology.md](references/methodology.md) before interpreting a comparison or writing competitive copy.
A device-profile claim is `publishable` only when all of these are true:
- both sites have at least 80% detection coverage, with a minimum of two successful detections
- the benchmark has direct DataGrail evidence
- the benchmark was explicitly marked approved
- the DataGrail median is faster than the target median
- the observed ranges do not overlap
The overall report is externally publishable only when every tested profile passes. Otherwise it is `internal_review`. Do not hide, rewrite, or reverse an unfavorable result. Keep it internal and either diagnose the implementation or run a new matched session for a legitimate methodological reason.
Use “faster in this test” rather than an unqualified product-wide claim. A live-site test measures the whole implementation: CMP configuration, tag manager, network, page code, geography, and vendor delivery.
## Failure handling
If bot protection, authentication, a CAPTCHA, an administrator policy, or a network restriction blocks a site:
- preserve the error in JSON
- generate the blocked-state share image
- report the target as unmeasured
- do not substitute a search result, earlier benchmark, or inferred CMP
## DataGrail content handoff
When the user also requests Daniel Barber or DataGrail LinkedIn copy, hand only current-session, quality-gated results to `dg-content-machine`. Get human approval before publishing, sharing outside the intended audience, or scheduling the post.
Install a current Node.js LTS release from nodejs.org. Then open Terminal on macOS or PowerShell on Windows and confirm it works with node --version and npm --version.
This skill runs in the Codex desktop app, not in an ordinary Chrome or Safari tab. Extract the .zip into the Codex skills directory, for example mkdir -p "$HOME/.codex/skills" and then unzip the download into it, and open the new consent-banner-speed-test folder.
From inside the consent-banner-speed-test folder, run npm install and then npx playwright install chromium. Restart Codex when it finishes.
Ask: "Use the consent-banner-speed-test skill to run a one-site diagnostic on https://example.com from California. Run the included local Playwright script and generate the complete output package." This needs no DataGrail benchmark.
Once a benchmark is approved and set up (or you give Codex its URL), ask: "Compare the consent-banner speed on https://example.com with our approved DataGrail benchmark." A comparison uses five fresh-browser desktop runs, five mobile runs and a 15-second detection window.
You get a share image, a detailed HTML report, a full-page report image and the raw JSON. Missing data is labelled Not measured or Not detected, never zero.
Use the consent-banner-speed-test skill to run a one-site diagnostic on https://www.your-site.example from California. Run the included local Playwright script and generate the complete output package.
Illustrative example. The figures are made up to show the layout. Diagnostic complete Your Site audit results. Region: California, US. 3 runs per device. No DataGrail benchmark was supplied, so no competitive claim was generated. desktop, 3/3 detected Median time to visible banner: 1.85s Observed range: 1.62s-2.10s Likely CMP: Not identified Consent requests: 6 Observed transfer: 42 KB Median FCP: 0.31s Median LCP: 0.45s mobile, 2/3 detected Median time to visible banner: 2.94s Observed range: 2.71s-3.30s (the run with no banner shows Not detected, never 0) Files: consent-speed-share.png, consent-speed-report.html, consent-speed-report.png, consent-speed-audit.json, plus a first-run screenshot for each device
This skill is a diagnostic. Read a result with these limits in mind.
Not detected does not mean zero milliseconds and does not mean non-compliant.DataGrail Consent Management is built to load fast and to keep every consent choice in one place, so the banner your visitors see is also the one you can prove.