# Framer analytics: install the tracking script

Add the snippet as a script in Framer's Project Settings → Custom Code, test on your framer.app address and attribute payments from checkout links.

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 Framer, open Project Settings, then the **Custom Code** tab.

**2. Add a script**

Click **Add Script** (or **+** if there's already one), name it SuprAnalytics, paste the snippet and place it in the head. Leave it on all pages.

```
<script
  defer
  supr-website-id="YOUR_WEBSITE_ID"
  supr-domain="yourdomain.com"
  src="https://supranalytics.app/js/script.js"
></script>
```

**3. Run it once**

For how often it runs, choose **Once**: the script counts every page change after that itself.

**4. Publish**

Publish your site, then open the published site to check.

## 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](https://supranalytics.app/docs/no-data.md).

## Test on your Framer address

Framer publishes every site to a `framer.app` address, and you can add a free `framer.website` one. When your website's domain in SuprAnalytics is your own domain, visits on those addresses aren't recorded until you allow them.

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.framer.app`, 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 `framer.app`, which would accept visits from every website on framer.app. 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](https://supranalytics.app/docs/exclude-visits.md).

If your site only lives on a Framer address (a custom domain needs a paid Framer plan), make that address the website's domain.

## Goals without code

A page can be a goal: on the dashboard's Goal panel, click **+** and give a name and a path, such as `/thanks`. It counts every visitor who reached that page. See [Track custom goals](https://supranalytics.app/docs/custom-goals.md).

## Attribute payments

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

| Checkout | What to add |
| --- | --- |
| [Polar Checkout Links](https://supranalytics.app/docs/polar-checkout-links.md) | Nothing: the script adds the visitor id when one is clicked. |
| [Dodo Payments payment links](https://supranalytics.app/docs/dodo.md) | Nothing: the script adds the visitor id when one is clicked. |
| [Paddle.js checkout buttons](https://supranalytics.app/docs/paddle.md) | Nothing once Paddle.js is on the page: the script adds the visitor id to buttons with the `paddle_button` class. |
| [Stripe Payment Links](https://supranalytics.app/docs/stripe-payment-links.md) | A few lines of JavaScript, pasted in the same custom code script, after the snippet. |
| [Lemon Squeezy checkout links](https://supranalytics.app/docs/lemonsqueezy.md) | A few lines of JavaScript, pasted in the same custom code script, after the snippet. |

Each one also needs its provider's webhook: see [Connect a payment provider](https://supranalytics.app/docs/connect-payment-provider.md). For any other checkout, send payments from your server with the [Payment API](https://supranalytics.app/docs/payments-api.md).

---

This page on the web: https://supranalytics.app/docs/framer
Every documentation page: https://supranalytics.app/docs.md
