Skip to content

Hold back your own scripts until consent

For developers: tag any script or embed in your Shopify theme with a consent category, and it only runs once the visitor agrees to that category.

Updated

Tools that aren't in Consent integration can still wait for consent. Mark them up in your theme, and CookieType releases them once the visitor agrees to that category. This only affects code you mark up yourself — other scripts are left alone.

Scripts

Change the script's type to text/plain and add data-cb-category with functional, analytics or marketing. For example: <script type="text/plain" data-cb-category="marketing">…</script>. The browser ignores it until consent is given; then it runs.

Embeds

For an iframe, such as a video or a map, rename src to data-cb-src and add a category: <iframe data-cb-src="https://…" data-cb-category="functional">. It loads once the visitor agrees.

Opening the preferences from your own link

  • A link to #cookie-preferences, for example in your footer.
  • Any element with a data-cb-open attribute.
  • In JavaScript, window.CookieBanner.open().

Still stuck?

Write to us — a real person answers, on every plan. Or email support@cookietype.com.

Contact support