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.
- Download the Shopify snippet.
- 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.
- Under Snippets → Add a new snippet create the snippet
berrycookie, paste the whole downloaded file and replaceYOUR-WEBSITE-PUBLIC-KEYwith the key from Websites → your site → Install. - Open
layout/theme.liquidand add{% render 'berrycookie' %}right after<head>, above{{ content_for_header }}and every other script. Save. - 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).
- In the BerryCookie dashboard, add both of the shop's domains to the website: your own domain and the
….myshopify.comaddress. - 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.