Skip to main content

Installing

Install on Webflow

Two minutes, and one trap that costs people an afternoon.

Two minutes, and one trap that costs people an afternoon.

Steps

  1. Open your project, then Site settings (not page settings).

  2. Go to Custom code.

  3. Paste the tag into Head code.

  4. Save changes.

  5. Publish the site.

<script
  defer
  data-website-id="ts_a1b2c3d4e5f6"
  data-domain="example.com"
  src="https://truestat.io/js/t.js"
></script>

Copy it from your site's install page in the app, with your real key already in it.

screenshot coming

The install page with the "Webflow" platform tab selected, snippet with real site key. Light theme.

screenshot coming

Webflow Site settings → Custom code → Head code field with the TrueStat snippet pasted in and the Save changes button visible. Webflow's own dark UI.

Site settings, not page settings. Head code in Site settings applies to every page. Head code in a single page's settings applies to that page only, which is how people end up tracking their homepage and nothing else.

The trap

Custom code does not run in the Designer preview. Webflow only emits it on the published site.

So the sequence that fails is: paste, save, click preview, see nothing happen, conclude the tag is broken. The sequence that works is: paste, save, publish, then load the published URL.

If you are on a .webflow.io staging domain rather than your own domain, the tag still works — but set data-domain to your real domain and add the staging hostname under Allowed hostnames in the site's TrueStat settings, so the cross-origin response is readable from both.

Which plan you need

Custom code in Site settings is available on Webflow's paid site plans. On the free plan the field is not there. There is no workaround that gets a <script src>` onto a free Webflow site.

Verify

  1. Publish.

  2. Load your published site.

  3. Check the install page in the app — it flips to Connected within seconds.

If it stays on Waiting, the two things to check first are whether you published (not just saved) and whether you loaded the published domain rather than the Designer preview.

Custom events on Webflow buttons

You can track a button click without writing any JavaScript. In the Designer, select the element, open the settings panel, and add a custom attribute:

NameValue
data-ts-goalsignup

Goal names are lowercase letters, digits, _, - and : only, up to 64 characters. A name with a capital letter is rejected and the event is dropped — see Tracking custom events.

screenshot coming

Webflow Designer element settings panel with a Custom attribute added: name "data-ts-goal", value "signup", on a button element. Webflow's dark UI.

Was this page helpful?

Last updated August 28, 2026