← Back to Installation Guides
Installation Guide

Install on Shopify

Add consent-widget.js at the top of the head in theme.liquid, before Shopify Analytics, GTM, and pixels.

Before you start

You need permission to edit the live theme code. Copy the Header snippet from Banner Setup → Installation. If the store already injects GTM in theme.liquid, use the GTM guide and skip this page.

<script src="https://www.sitetrust.com/consent-widget.js"
  data-configuration-id="YOUR_CONFIGURATION_ID">
</script>

Add the script

Step 1. Open the theme code

In Shopify admin go to Online Store → Themes. On the live theme, choose Edit code.

Step 2. Open theme.liquid

Find theme.liquid in the Layout folder. This file wraps every storefront page.

Step 3. Paste first in the head

Inside <head>, paste the SiteTrust snippet above Google Tag Manager, Google Analytics, Meta, Shopify additional scripts, and chat widgets.

Step 4. Save and preview

Save the file. Open the published storefront, not only the theme editor preview.

Shopify pixels and Customer Events

Pixels added under Settings → Customer events can still fire beside theme code. After SiteTrust is in theme.liquid, review those pixels. Marketing pixels should wait for consent. If a pixel still fires on first load, pause it or move it behind consent. Site Audit Run A will fail if a pixel transmits before a choice.

Checkout

Shopify checkout is a separate surface. Theme code does not always reach checkout. If you need the banner on checkout, use Shopify's checkout extensibility / additional scripts options available on your plan, or ask wecare@sitetrust.com with your plan type.

After you publish

  1. Open the live URL in an Incognito window, not only the editor preview.
  2. Confirm the banner appears before any click.
  3. Accept once and Decline once in separate clean sessions.
  4. Follow Test default, accept, and decline.
  5. Run Site Audit in the Client Trust Center.

Need help?

Email wecare@sitetrust.com with your site URL and platform. One business day response, Monday through Friday.