A Shopify store that sets cookies for visitors in Sweden needs a consent banner that works, and the banner Shopify ships covers only part of the job. I am Mariusz Szatkowski, a Shopify developer in Gdynia, Poland, and across the Oresund region my work stays remote and in writing. The storefront design is mine to make or yours to supply. I am not a lawyer: which cookies you may set is for you and your adviser to decide. I build the consent setup to match that decision.

Malmo town hall, Stortorget. Image by Liberaler Humanist, licensed CC BY-SA 3.0, via Wikimedia Commons.
#What does the Swedish cookie law say?
The rule sits in chapter 9, section 28 of lag (2022:482) om elektronisk kommunikation, the Electronic Communications Act. Riksdagen publishes the text, and the transitional provisions give 1 August 2022 as the date the Act entered into force. In my translation, the first paragraph says that data may be stored in or read from a subscriber’s or user’s terminal equipment only if the subscriber or user has access to information about the purpose of the processing and consents to it.
The second paragraph lets storage or access happen without consent where it:
- is needed to transmit an electronic message over an electronic communications network, or
- is necessary to provide a service at the explicit request of the user or subscriber.
The section speaks of “uppgifter”, data, stored in or read from a user’s device, not of cookies by name. The Swedish text does not define consent in this section. Which of your cookies fall inside the two exceptions is a question for your adviser, and the answer depends on what each cookie does.
#Who supervises: PTS or IMY?
Two authorities, for two layers. Chapter 1 section 6 of the Act says the government decides which authority is supervisory authority under it, and chapter 11 section 1 gives that authority the job of supervising compliance with the Act.
The Swedish Authority for Privacy Protection (IMY) says in a decision of 16 December 2024, diary number IMY-2023-16453, that the Swedish Post and Telecom Authority (PTS) is the sole competent supervisory authority for the Act, which sets the special requirements for storing cookies in terminal equipment and for collecting data from that equipment. The processing of personal data after collection, for example analytics or profiling, falls under the GDPR, where IMY is the competent authority. IMY’s own page on questions outside its remit says the same about cookies: several laws regulate them, among them the Electronic Communications Act, which PTS supervises.
I tried to read the PTS cookie guidance directly. Its site stopped my automated request, so this page does not summarise PTS guidance.
#What can happen after a breach?
Chapter 13, section 2 of the Act says that anyone who, intentionally or negligently, stores or reads data in breach of 9 kap. 28 § is fined, if the act is not punishable under the Penal Code. Minor cases are not offences. The list of breaches that carry an administrative penalty fee in chapter 12, section 1 names other sections of chapter 9, not section 28.
That is the cookie rule’s own sanction. Under the GDPR, a separate set of powers applies to the processing that follows. In the decision above IMY did not fine the company. It issued a reprimand under Article 58(2)(b) of the GDPR.
#What standard of consent does IMY apply?
IMY’s guidance on consent under the GDPR sets the standard it uses for personal data. Consent must be voluntary, so the person has a genuine free choice and can say no. Giving consent needs an unambiguous act: pre-ticked boxes are not allowed, and silence, inactivity, scrolling or merely using a service are not active choices. It must be as easy to withdraw consent as to give it, and the person must be told clearly that they can withdraw it.
The December 2024 decision applies this to a cookie banner. IMY found two problems:
- The company’s banner let a visitor accept with one click, while withdrawing took a route through the footer, the cookie policy and a settings centre with several more clicks. IMY said it was hard even to find where to withdraw. That breached the rule that withdrawal be as easy as giving consent.
- The decline option was a grey link and the accept option a green button on a white background, under a heading “Accept cookies”. IMY found the design steered the visitor toward accepting.
IMY also said that decline and accept need not look identical, but they must be equivalent so the visitor is not misled, and that a permanent floating icon on every page can meet the withdrawal requirement. It set no single technical solution or colour standard, and it judges each banner on its facts.
The decision concerns a company’s use of the GDPR on processing after collection. Chapter 9 section 28 uses the word consent without a definition in the text I read. Building to the stricter GDPR standard is a practical choice I recommend, not a statement of what PTS requires.
#How does the Shopify banner work?
The Shopify help centre says the cookie banner can be configured automatically for visitors in the UK and EEA regions, when the store has active markets there. In configured regions non-essential data is collected only after consent. You can also choose regions yourself under the banner settings. Customers can change their choices later through the banner or a Cookie preferences link in the footer.
That footer link is the answer to the withdrawal point from the IMY decision: one place on every page, reachable without a search. I check that it exists in the theme and that it opens the same choices that the banner offered.
The Shopify help centre also says the banner governs Shopify-specific tools, including cookies and Shopify Pixels. It does not cover third-party cookies or pixels you install manually. A script pasted into the theme, a chat widget or an ad tag is outside it.
#How do custom banners and third-party scripts connect?
Shopify’s Customer Privacy API covers the case where the store uses its own banner or an app’s banner. A custom banner records the choice by calling setTrackingConsent with the categories analytics, marketing and preferences, and sale_of_data is handled on its own. Shopify’s documentation says consent should be recorded only on a visitor interaction, and that Shopify cookies must never be read or changed directly. When the Shopify banner is enabled it passes consent to the API automatically.
For scripts outside Shopify’s tools, the setup is mine to build. Each third-party script waits for the visitor’s choice and loads only if the matching category is granted. Withdrawal stops it again. After the build I test it in a clean browser: load the store, inspect cookies and network requests before any choice, accept, decline, and withdraw.
#What the setup should record
- the list of cookies and scripts, with the purpose of each and the category it sits in
- which ones the adviser treats as covered by the exceptions in section 28
- the banner text in Swedish and in the other languages the store sells in
- where withdrawal lives, and the test date
- the regions configured in the Shopify settings
If you also sell to Denmark, the Danish rules are separate and not covered here.
#How a project runs
- You send the store address, the theme, the apps and scripts in use, and your deadline.
- I check what is set before and after consent on a preview theme and send the findings in writing.
- The banner setup and script gating are built on a duplicate theme, you review them, and the live theme changes only after your written approval.
- Your adviser receives the cookie list and the test record.
I work from a collaborator account on your store. Other Shopify work is described on the Shopify developer page.
#Send me your store
If your Malmoe store sells to visitors in Sweden, send the store address, the theme, the apps and scripts you use and your deadline through the contact form. Which cookies you set, and on what legal footing, is for you and your adviser to decide.