Most of the line items in a cookie consent audit are things people expect: analytics, ad pixels, chat widgets. The one that surprises developers is a font. No cookie is set, nothing shows up in an analytics dashboard, and the text simply renders the way the designer wanted. But the default way of embedding Google Fonts makes the visitor's browser talk to Google before the page has asked anyone for anything.
What the browser actually does
The standard embed is a stylesheet link to fonts.googleapis.com. That CSS then points the browser at the font files on fonts.gstatic.com. Both are requests from the visitor's browser straight to Google's servers, and like any HTTP request they carry the visitor's IP address plus the usual metadata: user agent, referrer and so on.
Under GDPR an IP address is personal data. The requests go out as the page loads, which on most sites is before the cookie banner has been touched. So personal data goes to a third party with no consent, and there is no obvious legitimate-interest argument, because nothing about the font requires it to come from Google's servers in particular.
Google isn't doing anything unusual here. This is how any CDN-hosted web font works. The GDPR question is about where the data went and on what basis, not about intent.
Check a site in two minutes
1. Search the code. In the project or theme:
grep -rn "fonts.googleapis\|fonts.gstatic" .
This catches <link> tags, CSS @import lines and hard-coded URLs in templates. On a live site you can't grep, view the page source and search for googleapis.
2. Watch the network. Open a private window, then DevTools → Network, and load the page without touching the banner. Filter for fonts.g. Any request to either domain went out before consent.
3. Ask the page itself. In the console:
performance.getEntriesByType('resource')
.map(r => r.name)
.filter(u => /fonts\.(googleapis|gstatic)\.com/.test(u))
An empty array on a fresh load is what you want. Check more than the homepage. A plugin, a widget or a single template can pull in its own font, and none of that shows up in your main stylesheet.
Why this one gets attention
This isn't a theoretical reading of the law. In 2022 the Munich regional court ruled on exactly this setup. Sending a visitor's IP address to Google through the standard Google Fonts CDN link, without consent, was found to violate GDPR. The court also pointed out that self-hosting was readily available and would have avoided the problem, which turns the CDN link into a design decision rather than a technical necessity.
Since then, German data protection authorities and privacy advocacy groups have sent many notices to websites about the same issue. That is why it has become a near-standard item in EU-focused audits, even though it is a narrower problem than, say, a Reject button that doesn't reject.
The fix: serve the files yourself
Self-hosting removes the third-party request completely. No IP goes to Google, and there is no consent question left to answer. It can even make the page slightly faster, because the browser no longer needs a DNS lookup and a connection to an extra host.
The steps are the same in almost any stack:
- Download the
.woff2files using the download option on Google Fonts itself. - Put them in your static assets.
- Replace the CDN
<link>with a local@font-facedeclaration:
@font-face {
font-family: "Inter";
src: url("/fonts/inter-regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
Repeat the block for each weight and style you actually use, then remove every remaining reference to fonts.googleapis.com. Run the network check again afterwards. Leftovers often come from a second place nobody remembered, such as a theme option, an embedded form or an old @import in a stylesheet.
If you can't self-host
The other valid route is to treat the font CDN like any other non-essential third party: don't inject the <link> until the visitor has consented, using the same mechanism that gates your other trackers. It works, but it is more fragile, and visitors who haven't chosen yet (or who reject) see a flash of unstyled text or the fallback font. For most sites, self-hosting is less work and gives a better result.
Limits of a check like this
The checks above only show what loads in the browser for the pages you open. A font loaded deeper in the site, or only after some interaction, won't show up until you reach that page or trigger it. And none of this is a legal assessment of a particular site. It just tells you whether the request happens.
This article first appeared on the Bannerproof blog. Bannerproof checks Google Fonts and other embedded third-party resources alongside the cookie banner and tracker behaviour: you can scan a site for free at bannerproof.app.
Written with AI assistance.
Top comments (0)