← Back to Badge Customization
Badge Customization

Combined consent and badge snippet

Consent first, badge second. Copy both IDs from the dashboard. Never swap the scripts or invent a badge ID.

Floating badge plus consent, in the head

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

Replace the two IDs with the values from Banner Setup and the badge card. Add data-sitetrust-size="compact" or data-sitetrust-domain only when the dashboard snippet includes them.

Inline badge plus consent

Keep the consent script first in <head>. Put the inline widget.js tag in the footer with data-sitetrust-mode="inline". Do not place the inline tag in the head.

If the site already has the badge

When you add consent later, do not paste a second widget.js. Leave the existing badge. Only add consent-widget.js above it.

If the site uses GTM for consent

Do not put consent-widget.js in the head. Use the GTM guide for consent. Keep widget.js in the head (floating) or footer (inline). Never add a second consent-widget tag.

Two different IDs

data-configuration-id is the banner. data-sitetrust-id is the badge. They are not interchangeable.

Need help?

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