Documentation

Shopify

On Shopify, use the BerryCookie theme snippet rather than the plain tag. Besides bc.js, the snippet passes the visitor's choice to Shopify through the Customer Privacy API (Shopify: Customer Privacy API), so Shopify's analytics, app pixels (Google & YouTube, Facebook & Instagram, TikTok) and the pixels in Customer events also wait for the choice made in the BerryCookie banner.

  1. Download the Shopify snippet.
  2. In the Shopify admin go to Online Store, open the menu (three dots) next to your theme and choose Edit code (Shopify: editing theme code). Duplicate the theme first, as a backup.
  3. Under Snippets → Add a new snippet create the snippet berrycookie, paste the whole downloaded file and replace YOUR-WEBSITE-PUBLIC-KEY with the key from Websites → your site → Install.
  4. Open layout/theme.liquid and add {% render 'berrycookie' %} right after <head>, above {{ content_for_header }} and every other script. Save.
  5. Settings → Customer privacy → Cookie banner: remove Shopify's banner (⋯ → Remove cookie banner) so visitors do not see two banners. Under Regions, keep the regions where consent is asked first (at least the EU/EEA, the UK and Switzerland), so Shopify holds its pixels until the choice is made in BerryCookie (Shopify: customer privacy settings).
  6. In the BerryCookie dashboard, add both of the shop's domains to the website: your own domain and the ….myshopify.com address.
  7. Use Check installation.

The snippet is part of the theme, so add it again if you switch themes. For a "Cookie settings" link in the footer, add a link to /#berrycookie-settings to the footer menu in Online Store → Navigation.

Need help? [email protected]

Ready to put it on your website?

Install it with one line of code, the Google Tag Manager template or the WordPress plugin.

Free for one website, no card. Create an account, add and verify your site, then paste one line of code — about ten minutes.