Menu

Your Google Fonts link tag sends visitor IPs to Google before consent
📰

Your Google Fonts link tag sends visitor IPs to Google before consent

DEV Community: frontend·Bannerproof Team·3 days ago
#3o6iTPV5
#devtofrontend#devto#dev#font#fonts
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.