Static sites

Hugo, Jekyll, plain HTML — one snippet.

The widget is a single async script with no dependencies, so it works on any static site. Drop it in your head template and every page is covered.

The universal snippet

Copy once, paste in your <head>.

Replace YOUR_SITE_ID with the id from your dashboard. Add data-api only when self-hosting or testing locally.

Get your embed code
<script async
  src="https://cdn.askthis.io/widget.js"
  data-site-id="YOUR_SITE_ID">
</script>

Hugo

layouts/partials/head.html

Add it to your head partial — usually layouts/partials/head.html (or _default/baseof.html) before </head>.

{{/* layouts/partials/head.html — before </head> */}}
<script async
  src="https://cdn.askthis.io/widget.js"
  data-site-id="YOUR_SITE_ID">
</script>

Jekyll

_includes/head.html

Add it to your head include (_includes/head.html) or your default layout (_layouts/default.html) before </head>.

<!-- _includes/head.html — before </head> -->
<script async
  src="https://cdn.askthis.io/widget.js"
  data-site-id="YOUR_SITE_ID">
</script>

Plain HTML

index.html

Paste it before the closing </head> (or </body>) on every page you want the widget on.

<script async
  src="https://cdn.askthis.io/widget.js"
  data-site-id="YOUR_SITE_ID">
</script>

Hosted builders & storefronts

Custom code / Script Manager → Head

Webflow, Squarespace, Wix, BigCommerce and Magento all have a site-wide custom-code / header-injection field — paste the snippet there. Webflow → Project settings → Custom code → Head; Squarespace → Settings → Advanced → Code injection → Header; BigCommerce → Storefront → Script Manager. (Native catalog plugins for BigCommerce/Magento are planned; the embed works today.)

<script async
  src="https://cdn.askthis.io/widget.js"
  data-site-id="YOUR_SITE_ID">
</script>

Prefer a component? See the React, Vue & Next.jspackages, or the full install guide.