Shopify
Add ConsentTrustee to your Shopify store. Two options: a Theme App Extension for Online Store 2.0 themes, or a manual snippet for any theme.
Quick install (manual snippet)
This works on every Shopify theme. It takes about two minutes.
1. Open your theme code
In your Shopify admin, go to Online Store > Themes. Click the three dots on your current theme and select Edit code.
2. Find theme.liquid
In the left sidebar, open Layout > theme.liquid. Find the head tag near the top of the file.
3. Paste the script
Add this line right after the opening head tag, before the content_for_header tag:
<script src="https://cdn.consenttrustee.com/consenttrustee.js?slug=your-domain-slug" data-domain="your-domain-slug"></script>Replace your-domain-slug with the slug from your ConsentTrustee dashboard.
4. Save
Click Save. Visit your store in an incognito window. The consent banner should appear.
Theme App Extension
If you are using a Shopify Online Store 2.0 theme, you can install ConsentTrustee as a theme app extension. This lets you configure the domain slug and language from the theme customizer without touching any code.
After installing the app, go to Online Store > Themes > Customize, then add the ConsentTrustee block from the App blocks section. Enter your domain slug in the block settings and save.
Blocking Shopify scripts
Shopify injects its own analytics and marketing scripts that you cannot easily modify. If your theme loads third-party tracking scripts, you can block them by changing the script type:
<!-- Before -->
<script src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>
<!-- After -->
<script type="text/plain" data-ct-category="statistics"
data-src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>For Shopify's built-in analytics (managed through the Shopify admin), those run in a first-party context and are generally considered necessary for store operation. Focus blocking on third-party marketing and analytics scripts you have added yourself.
Google Consent Mode
ConsentTrustee automatically handles Google Consent Mode v2 if it is enabled in your banner configuration. No extra Shopify setup needed. The script sets consent defaults to denied before any Google tags fire, then updates them when the visitor makes a choice.
Things to know
- -The banner does not appear on checkout pages. Shopify restricts third-party scripts on checkout.
- -When you update your theme, the snippet in theme.liquid stays. Theme updates do not overwrite code edits.
- -If you switch themes, you will need to add the snippet again to the new theme's theme.liquid.