> ## Documentation Index
> Fetch the complete documentation index at: https://agentref.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Framer Integration

> Install AgentRef on Framer and use Stripe-hosted surfaces without the extra helper scripts other tools often require.

Framer is the guide where AgentRef differs most clearly from other affiliate tools: you only need the main tracking script. AgentRef already handles late-rendered Stripe links, Buy Buttons, and Pricing Tables by itself.

## Before you start

* Set the program website in AgentRef to the same root domain as your Framer site.
* Copy the exact script snippet from `Settings -> Integration`.
* Decide whether you use Stripe-hosted surfaces or a custom checkout flow.

## Install the script in Framer

1. Open your Framer project.
2. Go to `Site Settings -> General -> Custom Code`.
3. Paste the AgentRef script into the `End of <head>` field.

```html theme={null}
<script
  defer
  src="https://www.agentref.co/api/tracking/script.js?pid=YOUR_PROGRAM_ID"
></script>
```

4. Publish the site.

## What makes AgentRef different on Framer

Other tools often need extra body scripts in Framer to rewrite Stripe links after the page renders. AgentRef already does that internally.

That means:

* no separate Stripe Payment Link enhancer script
* no separate Pricing Table enhancer script
* no separate Buy Button enhancer script

As long as the AgentRef script is loaded on the page, it will observe the DOM and instrument supported Stripe-hosted surfaces automatically.

## Checkout compatibility on Framer

| Flow                                                                          | Status with AgentRef                                         |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------ |
| Stripe Payment Links, Buy Buttons, or Pricing Tables directly on Framer pages | Supported directly.                                          |
| Custom Stripe checkout handled by your own backend or app                     | Supported with the [Stripe guide](/docs/integration/stripe). |
| External commerce tool that owns checkout without a Stripe metadata bridge    | Not automatic.                                               |

## Multi-domain and consent notes

* If Framer is just the marketing layer and checkout begins on `app.example.com`, install AgentRef on both surfaces.
* Different root domains do not share first-party cookies automatically.
* If you use a consent manager, call `window.AgentRef.setConsent('granted')` after opt-in.

## Verify the installation

<Steps>
  <Step title="Publish the Framer site">
    Framer custom code only matters on the published site.
  </Step>

  <Step title="Run a real referral visit">
    Open a live affiliate link and confirm `agentref_cid` and `agentref_pid`.
  </Step>

  <Step title="Check hosted Stripe instrumentation">
    If the page contains Stripe links or elements, use `?agentref_debug=1` and inspect the console or DOM.
  </Step>

  <Step title="Validate the checkout path">
    If you create custom Checkout Sessions elsewhere, follow the [Stripe guide](/docs/integration/stripe).
  </Step>
</Steps>

## Troubleshooting

* Payment Links are still plain after publish: confirm the AgentRef script actually loads on the same page as the links.
* The Framer page records clicks but conversions never appear: your checkout path is probably outside Framer and still needs the Stripe metadata bridge.
* Cookies do not survive from Framer to the app: keep both on one root domain and install AgentRef on both.

## Related docs

<CardGroup cols={3}>
  <Card title="Stripe Checkout" icon="credit-card" href="/docs/integration/stripe">
    Use this if Framer hands off into your own Stripe session-creation backend.
  </Card>

  <Card title="Debug Mode" icon="bug" href="/docs/tracking/debug-mode">
    Inspect hosted Stripe instrumentation and runtime warnings.
  </Card>

  <Card title="JavaScript Snippet" icon="code" href="/docs/tracking/javascript-snippet">
    Full script behavior and DOM API reference.
  </Card>
</CardGroup>
