Cookie consent: the rules, and where sites get them wrong
Two sets of rules apply: the ePrivacy rules on storing anything on a visitor's device, and GDPR when the data is personal.
When consent is needed
Storing or reading information on a visitor's device needs consent before it happens, unless it is strictly necessary for the service the visitor asked for. In Sweden this rule is in the Electronic Communications Act, lag (2022:482) om elektronisk kommunikation.
- No consent needed: session cookies, a shopping cart, load balancing, security, remembering the consent choice itself.
- Consent needed: analytics such as Google Analytics, advertising pixels such as Meta and LinkedIn, A/B testing, chat widgets that track.
What valid consent looks like
- Given before the cookie is set, not after.
- Freely given and as easy to refuse as to accept.
- Specific and informed: the visitor can see what each category is for.
Where sites get it wrong
The most common failure is technical, not legal: the banner is there, but the analytics or ad tags load with the page anyway, so the cookies are set before the visitor has answered. Nobody notices, because the site looks compliant.
What Swedish regulators have done
The Swedish Authority for Privacy Protection (IMY) has fined companies whose tracking pixels sent visitor data to Meta: SEK 37 million for Apoteket and SEK 15 million for Avanza. Its decisions on cookie banners after complaints have so far ended in orders and reprimands rather than fines.
How to check a site
Open the site in a private window, do not touch the banner, and look at the cookies in the browser's developer tools. Or let SiteVitals' cookie consent check do it on every page, every week.
This guide is general information, not legal advice.