Shopify
How to implement Visible Privacy with Shopify.
Shopify loads its own scripts before any custom or third-party scripts, so some cookies may be set before consent is given. Visible Privacy integrates with Shopify's Customer Privacy API to help you signal user consent, but cannot block all cookies set by Shopify or its apps. If you encounter any problem during the installation, feel free to send an email to [email protected]
Implementing Visible Privacy with Shopify
Visible Privacy helps you manage cookie consent and signal user preferences to Shopify's Customer Privacy API. This guide will walk you through the process of installing and configuring Visible Privacy on your Shopify store.
Prerequisites
Before beginning, ensure you have:
- Access to your Shopify admin panel.
- Your Visible Privacy Client ID (provided after onboarding).
Installing the Visible Privacy Consent Banner
Access the Shopify Code Editor
In your Shopify admin, go to Online Store > Themes. Click the Customize button for your current theme. Click the ••• button, then select Edit code.
Create a new Snippet
Under the Snippets section, click Add a new snippet. Name the new snippet visible-privacy-consent
and click Create snippet. Open the new visible-privacy-consent.liquid
file and add the Visible privacy script as content:
Replace "MerchantID"
with your actual Client ID provided by Visible Privacy.
Save the snippet.
Render the Consent Snippet
In theme.liquid
, find the line: . Add this code directly under it:
Click the Save button.
After saving your changes, test your store to ensure the Visible Privacy banner appears and consent is signaled to Shopify. Note: Some cookies set by Shopify or apps may not be blockable.