Cookies on a company website: what do you have to do?
Do you need a cookie banner? A short guide to what Swedish rules require of cookies on a company website, which cookies are exempt and what the regulator has asked for.
Short answer
You need consent for cookies that are not necessary for something the visitor asked for themselves, such as statistics and marketing. Cookies needed for a feature to work, like a shopping basket or a login, do not need consent. If you only use those, you need no cookie banner, but you should still tell visitors about them.
What the law says
The cookie rules sit in the Swedish Electronic Communications Act (lagen 2022:482 om elektronisk kommunikation), chapter 9, section 28. The main rule is that you may only store or read information in a visitor's browser if the visitor is told the purpose and consents. The Swedish Post and Telecom Authority (PTS) supervises this part. If the cookies handle personal data, the GDPR also applies, and there the Swedish Authority for Privacy Protection (IMY) is the regulator.
This is not legal advice. If you are unsure, ask a lawyer or PTS.
Which cookies need consent?
No consent needed
- The basket in a web shop
- Login and sessions
- Security, such as protection against form abuse
- Things the visitor explicitly asked for
Consent needed
- Advertising and tracking across sites
- Embedded content that sets its own cookies, such as some videos and maps
- Statistics and analytics tools that store cookies
- Chat tools and similar that save a visitor ID
The line is not always obvious. PTS treats cookies as necessary when they are needed for a service the user explicitly requested. Statistics cookies do not normally fall under that, so expect them to need consent. Check which cookies your site actually sets, because many arrive with tools and plugins nobody remembers adding.
How a cookie banner should work
PTS has reviewed cookie banners on several large Swedish websites, and what it asked for is a good guide to what is expected:
- Declining must be as easy as accepting, in the same view. A "Manage cookies" button that needs extra clicks before you can say no is not enough
- The information must say what the cookies are used for, for example grouped as settings, statistics and marketing
- No cookies beyond the necessary ones may be set before the visitor says yes
- Visitors must be able to withdraw consent as easily as they gave it
This is not only for big companies. The law does not distinguish by size.
What to do
- List every cookie and tool the site uses. Free scanners exist, and your browser's developer tools show them too.
- Remove what you do not need. Every tool you drop is one less thing to ask consent for.
- Sort the rest into necessary, statistics and marketing.
- Set up a cookie banner that loads statistics and marketing only after a yes.
- Write a page about cookies and personal data that says what you use, why and for how long.
- Test it yourself: decline, reload the page and look at which cookies are still set.
What it means for the build
A site is easier to get right if it is built with few outside services from the start. We include the question of cookies and tracking when we build websites and web shops, and check it again in operation and maintenance, because new plugins and tools tend to creep in over time.
If you want us to look at what your site sets today, you can book a meeting.

