# Install on Framer

> Add Reveata to a Framer site, serve it from your own subdomain, and credit sales to their visits.

Framer adds custom code to every page from the project settings.

Copy the snippet from your Reveata dashboard (it contains your website’s tracking id):

```html
<script
  defer
  data-website-id="ws_your_tracking_id"
  src="https://reveata.com/js/script.js"
></script>
```

## Add it to your site

1. Open your project and go to its settings (**Site Settings**, or **Project Settings** in newer versions), then the **Custom Code** section.
2. Add a script (**Add Script**, or the **+** button) and paste the snippet. Name it `Reveata`.
3. Place it at the **End of `<head>` tag**, on **all pages**. If Framer asks how often it runs, choose **Once**: the script follows page changes by itself.
4. Save, then **Publish** the site. Custom code doesn’t run in the canvas or the preview, only on the published site.

In Reveata, add the website with your custom domain. Your `.framer.website` address (and a Framer staging site) is another host: visits there are refused unless you add it under **Settings → General → Additional domains**.

Framer sites move between pages without full page loads. The script follows those navigations, so every page view is counted.

## Serve it from your own subdomain

Framer can’t run proxy code, but the [managed proxy](https://reveata.com/docs/managed-proxy) needs none: add one DNS record (for example `stats.example.com`) where your domain’s DNS is managed, and paste the new snippet Reveata gives you in place of the old one. It works with a custom domain, not with the `.framer.website` address.

## Revenue

Framer has no checkout of its own, so sales happen in the tool your buttons link to:

- **Stripe Payment Links** linked from your pages are credited to their visit with no code: the script adds the visitor id when someone clicks. Connect Stripe in Reveata under **Settings → Payments**. See [Stripe Payment Links and buy buttons](https://reveata.com/docs/stripe-payment-links).
- **Checkout plugins from the Framer Marketplace** that charge through your own Stripe account: connect that Stripe account in Reveata ([restricted key](https://reveata.com/docs/stripe-restricted-key) or [Connect with Stripe](https://reveata.com/docs/stripe-connect)). Their payments carry no visitor id, so they are credited by the buyer’s email, for visitors you [identified](https://reveata.com/docs/identify-visitors).
- **Other checkouts:** connect the provider in Reveata and follow its page in [Connect a payment provider](https://reveata.com/docs/connect-a-payment-provider).

If buyers come back to a thank-you page on your Framer site, the payment can also be linked from there: see [Thank-you page payments](https://reveata.com/docs/thank-you-page-payments).

## Check it works

1. Open your published site in a normal browser window with ad blockers turned off for it.
2. Open **Realtime** in Reveata: your visit appears within a few seconds. Click to another page: it is counted too.
3. If nothing arrives, follow [Verify your installation](https://reveata.com/docs/verify-your-installation).

## Goals

Framer has no panel for custom attributes on buttons. Two ways that work:

- **Page visit goals, no code.** In Reveata open **Goals → Add goals → Page visit, no code**, and enter the path of a page people reach after the action, such as `/thanks`.
- **A code override.** Framer’s overrides can add data attributes to an element: return `{ 'data-reveata-goal': 'signup' }` from an override and apply it to the button.

See [Custom goals](https://reveata.com/docs/custom-goals).

## Common pitfalls

- **Testing in the canvas or preview.** Custom code only runs on the published site.
- **Not republished.** Changes to custom code go live with the next publish.
- **“Run on every page visit”.** Not needed: the script already counts page changes. Running it again on every page doesn’t double count, but **Once** is cleaner.
- **Testing on `.framer.website`.** It is refused unless it is one of the website’s additional domains.
- **A cookie banner** that holds back scripts until people accept: visits only count after they do. [Cookieless mode](https://reveata.com/docs/privacy-and-cookies) needs no cookies.
