DEV Community

ByteStay
ByteStay

Posted on

What a website does before the cookie banner is clicked

Disclosure: we're ByteStay and we built Lumen GDPR, the API in this post. There's a free plan and a no-signup demo, so you can check everything below yourself.

A cookie banner is a question: may we? But a lot happens on a page before anyone answers it.

We loaded 7 European news homepages in a real Chromium with a fresh profile, and clicked nothing:

  • All 7 stored cookies before any click: between 4 and 31 per homepage.
  • All 7 talked to third-party hosts before any click: between 4 and 43 of them, and between 43 and 345 requests in total.
  • 4 of 7 contacted advertising services before any click. One of them reached 5 ad hosts and another 4, both including Google's ad server.
  • 2 of 7 loaded Google Fonts from Google's servers.
  • 4 of 7 had a consent platform with the IAB TCF API in place, so a banner existed. It just hadn't been answered yet.

We're not naming the sites. What matters is how normal this is, and how invisible it is from the outside.

Why the requests matter as much as the cookies

Most people think of consent as a cookie problem. The rule is wider than that.

  • ePrivacy art. 5(3) covers storing or reading anything on the visitor's device, not only cookies.
  • The CJEU's Planet49 ruling (C-673/17) says a pre-ticked box is not consent: the visitor has to act.
  • The EDPB's Guidelines 2/2023 spell out that tracking pixels and similar techniques fall under the same rule.

And a request on its own sends something: the visitor's IP address. That's where Google Fonts comes in.

The Google Fonts ruling

On 20 January 2022, the Regional Court of Munich (LG München I, case 3 O 17493/20) ruled against a website that loaded Google Fonts from Google's servers.

  • A dynamic IP address is personal data for the website operator.
  • No legitimate interest: the fonts can be self-hosted, so there was no need to send the visitor's IP to Google.
  • The court awarded €100 in non-material damages under GDPR art. 82, and ordered the site to stop.

€100 sounds small. But in 2022 it was followed by a wave of mass warning letters in Germany, all over the same few lines of HTML.

The fix is cheap: download the font files and serve them from your own domain. The hard part is noticing, because the request happens in a <link> tag, a theme, or a plugin you didn't write.

What Lumen does

You send a URL. Lumen loads that one page in Chromium, like a first-time visitor, and doesn't click anything.

It reports what happened before consent:

  • Every cookie already stored, with its vendor and category (analytics, advertising, session replay, consent, or unknown).
  • Every host the page contacted, grouped by company, category and country, including tags injected by tag managers.
  • The consent platform it found (it detects 25), whether there's a banner, and whether the IAB TCF API is present.
  • Whether Google Fonts are loaded from Google's servers.
  • What the privacy policy covers. Lumen finds it, reads it and checks the items GDPR art. 13 requires, such as the controller, the legal basis, retention and the right to complain.
  • Form and security problems: personal data sent over HTTP or in the URL, missing HSTS, mixed content, and cookies without Secure.

Each issue comes back as a finding, with an id, a severity, the evidence, a fix and the legal basis. There are 26 rules in total.

Here is the Google Fonts finding from one of the seven homepages, exactly as the production API returned it:

{
  "id": "LUM-04",
  "severity": "medium",
  "title": "Google Fonts loaded from Google's servers",
  "detail": "Fonts are fetched from fonts.googleapis.com / fonts.gstatic.com, which sends each visitor's IP address to Google without consent.",
  "evidence": {
    "hosts": ["fonts.googleapis.com", "fonts.gstatic.com"]
  },
  "recommendation": "Self-host the font files on your own domain.",
  "legal_basis": "GDPR art. 6(1); LG München I, 3 O 17493/20 (2022)"
}
Enter fullscreen mode Exit fullscreen mode

And the pre-consent requests from the same page (we redacted the one subdomain that names the publisher):

{
  "id": "LUM-02",
  "severity": "high",
  "title": "Tracking services contacted before consent",
  "detail": "The page sent requests to 7 analytics, advertising or session-replay services before any consent, which shares the visitor's IP address and device data with them.",
  "evidence": {
    "services": [
      "securepubads.g.doubleclick.net (Google, advertising)",
      "dpm.demdex.net (Adobe, advertising)",
      "static.chartbeat.com (Chartbeat, analytics)",
      "api.permutive.app (Permutive, advertising)",
      "cdn.permutive.app (Permutive, advertising)",
      "mab.chartbeat.com (Chartbeat, analytics)",
      "<publisher>.demdex.net (Adobe, advertising)"
    ]
  },
  "recommendation": "Load these services only after opt-in consent; keep strictly necessary ones only.",
  "legal_basis": "ePrivacy Directive art. 5(3); GDPR art. 6(1)(a), 7; EDPB Guidelines 2/2023 on art. 5(3)"
}
Enter fullscreen mode Exit fullscreen mode

The full report also has a score from 0 to 100 and a grade from A to F, so you can track a site over time.

Why a real browser

Lumen also has a quick mode: plain HTTP, no JavaScript. We ran the same homepage both ways:

Quick (HTTP only) Full (Chromium)
Time 1.5 s 11.4 s
Cookies seen 0 31
Google Fonts not seen seen

Almost everything that happens before consent is done by JavaScript and tag managers. Quick mode is fine for a cheap first pass or for many URLs, but full mode is what a visitor's browser actually does.

One call

curl -X POST https://lumen-gdpr-website-scanner-api.p.rapidapi.com/v1/scan \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: lumen-gdpr-website-scanner-api.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.example.com/", "mode": "full", "include_policy": true}'
Enter fullscreen mode Exit fullscreen mode

A full scan usually takes 5 to 15 seconds. In CI, fail the step when summary.high is above zero:

jq -e '.summary.high == 0' lumen.json > /dev/null
Enter fullscreen mode Exit fullscreen mode

That catches the classic regression: a new pixel added through the tag manager, firing before consent on the next deploy.

How it works

  • One page per scan. Lumen doesn't crawl or click, so scan each template that matters (home, article, checkout) separately.
  • Respects the site's wishes. If a site opts out in robots.txt or asks visitors to prove they're human, Lumen doesn't work around it: you get scan_status: "unavailable" with the reason.
  • US transfers are info only. Since 2023 the EU-US Data Privacy Framework makes transfers to certified US companies lawful, so LUM-14 lists providers outside the EEA as information, not as a violation.
  • Findings are technical signals, not legal advice. Whether a cookie is strictly necessary depends on context, and cookies we can't attribute to a known vendor are listed as unknown for a human to check.
  • Scan sites you're responsible for. The terms forbid mass scanning to send warning letters, and each site can only be scanned a few times a minute.

Privacy

  • Scans run in the EU (Paris), in a fresh browser profile each time.
  • Results are cached in memory for up to 1 hour, then forgotten.
  • After you fix something, add "fresh": true to scan again right away.
  • We don't keep request logs with the URLs you scan.
  • The scanner announces itself as LumenGDPR in its user agent and honours robots.txt.

Try it

The demo on lumen.bytestay.pt runs the real API in your browser, with no signup. Enter your own site.

On RapidAPI, Basic is $0 for 15 scans a month, with a hard limit, so it never runs up a bill. Paid plans start at $15 for 1,000 scans, and the docs are on the same page.

Lumen is also on api.market, with a 7-day free trial, once per customer. The 26 rules and the legal basis for each are on lumen.bytestay.pt/rules.html.

Questions about a finding on your site? Tell us, we read every message.

Top comments (0)