How do I enable Shopify’s Customer Privacy API for Cookiebot?
Pass Cookiebot consent choices to Shopify by adding a small snippet to your theme, so Shopify’s own tracking respects your visitors’ cookie preferences.
Enabling Shopify’s Customer Privacy API passes the consent choices visitors make in the Cookiebot banner on to Shopify, so Shopify’s own tracking respects them. The steps below follow Cookiebot’s own guide: Enabling the Customer Privacy API.
In your Shopify admin, go to Online Store > Themes, click the three dots next to your live theme and choose Edit code. Under Snippets, add a new snippet.
Name the new snippet “cookie-consent” and click Done.

Open the empty cookie-consent.liquid file and paste in the following code:
Save the snippet, then open the theme.liquid file in your theme code.
Directly below the line {{ content_for_header }}, add the following code:
Save the theme.liquid file.
Last updated
Was this helpful?

