Shopify Integration
Install Consentio on your Shopify store
Installation via theme.liquid
The easiest method. Follow these steps:
- Log in to your Shopify admin
- Go to Online Store → Themes → Actions → Edit code
- Find the
theme.liquidfile in the Layout section - Insert the following code before
</head> - Save your changes
HTML
<script src="https://consentio.cz/widget/YOUR_KEY/consentio.min.js" async></script>
Tip: You can find the widget key in the Consentio dashboard for your website under Installation.
Alternative: Shopify Custom Pixels
For merchants who do not want to edit the theme code.
- Go to Settings → Customer events → Add custom pixel
- Name the pixel (e.g. “Consentio”)
- Paste the code
Warning: Custom Pixels run in a sandbox (iframe) and have limitations.
We recommend using the theme.liquid method for full functionality.
Blocking Scripts in Shopify
In Shopify templates you can block third-party scripts the same way as on a regular website.
HTML
<!-- Blocking Klaviyo -->
<script type="text/plain" data-category="marketing"
src="https://static.klaviyo.com/onsite/js/klaviyo.js">
</script>
<!-- Blocking Facebook Pixel -->
<script type="text/plain" data-category="marketing">
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
Shopify Markets and Multilingual Support
Consentio automatically detects the language from the lang attribute on the <html> element.
Shopify Markets sets this attribute based on the customer's region.
Tip: If you use Shopify Markets, the cookie banner will automatically appear
in the correct language without any additional configuration.
Compatible Apps
| App | Category | Blocking Method |
|---|---|---|
| Google Analytics 4 | analytics | Google Consent Mode (automatic) |
| Facebook Pixel | marketing | type="text/plain" |
| Klaviyo | marketing | type="text/plain" |
| TikTok Pixel | marketing | type="text/plain" |
| Hotjar | analytics | type="text/plain" |