Installation guides

Webflow analytics: install the tracking script

Paste the snippet in Webflow's Head code, test on your webflow.io address, track a signup button with a custom attribute and attribute checkout-link payments.

Your snippet is in Settings → General of the website (the gear next to its name on the dashboard), with its id and domain filled in. The examples below use YOUR_WEBSITE_ID and yourdomain.com: replace them with yours.

  1. Open the custom code settings

    In the Webflow Designer, open Site settings → Custom code. (Custom code needs a paid site plan.)

  2. Paste the snippet in the head section
    <script
      defer
      supr-website-id="YOUR_WEBSITE_ID"
      supr-domain="yourdomain.com"
      src="https://supranalytics.app/js/script.js"
    ></script>

    Paste it in Head code.

  3. Save and publish

    Builders only add custom code to the published website, so publish once more after saving.

Check it works

Open your website in a normal browser window, then the dashboard: the visit shows up within seconds, and the install card on a new website turns into the dashboard by itself. Nothing after a minute? See Not seeing any data.

Test on your webflow.io address

Webflow publishes to a staging address, yoursite.webflow.io, as well as to your own domain. Visits on the staging address aren't recorded until you allow it.

SuprAnalytics only records visits from your website's domain (Settings → General → Domains), its subdomains and the domains listed under Settings → General → Domains → Additional domains. A page anywhere else gets 403 Hostname not allowed for this website from /api/event (you'll see it in the browser's Network tab) and nothing is recorded. That's what stops another website from sending data to yours.

To record visits on yoursite.webflow.io, add that full address under Settings → General → Domains → Additional domains (up to 20); the snippet doesn't need to change. Add the whole address, not webflow.io, which would accept visits from every website on webflow.io. Or test on your own domain instead, once it's connected and published.

Visits on that address count as different visitors from your own domain, since cookies can't be shared between domains. When you're done testing, remove it, or keep it out of your stats with Exclude visits.

Track a signup button with a custom attribute

Webflow's custom attributes add the goal attribute to any element, with no code:

  1. Select the button

    In the Designer, select your signup button or link block.

  2. Add the attribute

    Open the Element settings panel (D). Under Custom attributes, click + and add the name supr-goal with the value signup. Add more supr-goal-* attributes for properties, such as supr-goal-plan with the value pro.

  3. Publish

    The published button looks like this, and each click completes the goal:

    <a
      href="https://app.yourdomain.com/signup"
      class="button"
      supr-goal="signup"
      supr-goal-plan="pro"
    >Sign up</a>
  • The goal is sent even when the button leads to another page or website, such as your app.
  • Goal names are stored in lowercase, with spaces turned into underscores, so Sign up becomes sign_up. Short names like signup read best.
  • A form's submit button counts clicks, including ones the form then rejects. If your form leads to a thank-you page, a page-visit goal on that page counts only finished submissions, with no attribute.

Attribute payments

A builder website usually sells through a checkout link or button. These are tied to the visitor who clicked:

CheckoutWhat to add
Polar Checkout LinksNothing: the script adds the visitor id when one is clicked.
Dodo Payments payment linksNothing: the script adds the visitor id when one is clicked.
Paddle.js checkout buttonsNothing once Paddle.js is on the page: the script adds the visitor id to buttons with the paddle_button class.
Stripe Payment LinksA few lines of JavaScript, pasted in Head code after the snippet.
Lemon Squeezy checkout linksA few lines of JavaScript, pasted in Head code after the snippet.

Each one also needs its provider's webhook: see Connect a payment provider. For any other checkout, send payments from your server with the Payment API.

AI agent or LLM? Read this page as Markdown