Cookie consent
Cookie consent is a visitor's active permission for a website to set or read non-essential cookies, such as analytics and marketing cookies.

What is cookie consent?
Cookie consent is the permission a visitor gives before a website may store or read cookies that are not strictly necessary — typically cookies for analytics, personalization, and marketing. The requirement stems from the ePrivacy Directive and the GDPR, and consent must be obtained before those cookies are set. Strictly necessary cookies (such as cart and login) are exempt and require no consent.
Why does cookie consent matter?
For an online store, consent is both a legal requirement and a precondition for reliable measurement. Valid consent must be freely given, specific, informed, and unambiguous — and it must be as easy to withdraw as to give. Pre-ticked boxes or “continued browsing” do not count as consent. Ignore the rules and you risk fines and a data processing agreement that does not hold up, while overly aggressive blocking can conversely cut away part of your analytics and ad data.
Common use cases
- Showing a cookie banner on the first visit where the visitor can actively accept or reject non-essential cookies.
- Wiring consent into Google Consent Mode v2 so GA4 and Google Ads tags respect the choice — required for EEA traffic in Google Ads.
- Blocking marketing pixels (Meta, TikTok) and server-side tracking until consent is granted.
- Storing and time-stamping consents so they can be documented during an audit.
- Giving visitors an easy way to change or withdraw their consent.
Shopify perspective
Shopify has a built-in cookie banner and a Customer Privacy API (window.Shopify.customerPrivacy) that tracks consent status and can control when pixels and apps are allowed to fire. Enable the banner under Settings → Customer privacy, and pick an approved consent app if you need region rules or more granular control. Afterwards, verify in the browser’s network tab that no marketing cookies are set before acceptance.