Install

Shopify

Add the CookieTrue banner to a Shopify store by pasting one line into your theme, and what to know about checkout and Shopify's own tracking.

On Shopify you add CookieTrue by placing one line in your theme. It takes two minutes and works with every theme.

#Steps

  1. In the Shopify admin open Online Store → Themes.
  2. Click ⋯ next to your live theme and choose Edit code.
  3. Open layout/theme.liquid.
  4. Copy your line from the dashboard (Installation → Shopify) and paste it as the very first thing after <head>:
<head>
  <script id="cookietrue" src="https://cdn.cookietrue.com/s/ct_yoursiteid.js"></script>
  {{ content_for_header }}
  ...
  1. Click Save.

Open your store in a private window to see the banner.

#Why first, and above content_for_header

Shopify and its apps add scripts through content_for_header. CookieTrue can only hold back scripts that load after it, so it has to come first.

#What about checkout?

Shopify controls the checkout pages. On most plans a theme cannot add scripts there, so the banner does not appear at checkout. Your visitors have already decided on the storefront pages before they get there, and their choice is remembered.

#Shopify's own analytics and apps

  • Trackers you add through apps or theme settings, such as the Meta pixel or Google Analytics, are recognised and held back until consent as long as they load through your theme.
  • Shopify's own first-party analytics is part of the platform. Whether it needs consent depends on your settings and the region; check Shopify's documentation and your own legal advice.
  • If an app loads a tracker we do not know, add it under Blocking → Extra services to block. See Blocking.

#If something goes wrong

Remove the line from theme.liquid and save. The theme returns to how it was. See Troubleshooting for the banner not appearing.

Still stuck? Write to [email protected]. A person answers, usually the same day.