Cookie banner on Shopify: the line in the theme
by Advisorn · Checked on 26 October 2026
On Shopify EasyCookie's line goes in the theme's theme.liquid file, right after the opening head tag. The banner stops scripts added to the theme; Shopify's analytics and the pixels added through customer events follow Shopify's consent system instead, to which EasyCookie is not connected today.
Installation · Step by step
- 1On EasyCookie add the shop and copy the banner's line from the “Install and switch on” section.
- 2In Shopify open Online Store › Themes and, from the “…” menu of the live theme, choose Duplicate: that is the backup copy.
- 3From the same menu choose Edit code and open theme.liquid in the Layout folder.
- 4Find the opening
<head>tag and paste the line right after it, before all other scripts. Save. - 5Switch on the banner on EasyCookie and open the shop in a private window to see it.
What stays with Shopify
Shopify manages consent for its own analytics and for the pixels added in Settings › Customer events with its Customer Privacy API. EasyCookie is not connected to that system, so it does not stop those pixels. If you sell to customers in the EU and use those pixels, take this into account when choosing: either move them into the theme, marked for EasyCookie, or use Shopify's system for them.
On EasyLPD
This guide explains the rules in general and how EasyCookie works: it is not advice on your case. Platforms change their menus: if a name does not match, look for the option with a similar name.