> ## 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.

# Webflow Integration

> Install AgentRef on a Webflow site and understand when Webflow pages are a good fit for AgentRef's supported checkout contract.

Webflow is a strong fit for AgentRef when it is used for a marketing site, landing pages, or pages that host Stripe links and embeds.

## Before you start

* Set the program website in AgentRef to the same root domain your Webflow site uses.
* Copy the exact script snippet from `Settings -> Integration`.
* If your app or checkout starts on another subdomain, install AgentRef there too.

## Install the script site-wide

1. Open your Webflow project.
2. Go to `Site Settings -> Custom Code`.
3. Paste the AgentRef script into the `Head Code` field.

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

4. Save the change.
5. Publish the site.

<Note>
  Webflow custom code only runs on the published site, not in the Designer preview.
</Note>

## Checkout compatibility on Webflow

| Flow                                                                           | Status with AgentRef                                         |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------ |
| Stripe Payment Links, Buy Buttons, or Pricing Tables embedded on Webflow pages | Supported directly.                                          |
| Custom Stripe checkout you own outside Webflow Ecommerce                       | Supported with the [Stripe guide](/docs/integration/stripe). |
| Webflow Ecommerce native checkout                                              | Not an automatic AgentRef attribution surface today.         |

## Multi-domain and consent notes

* Webflow marketing site plus app subdomain is fine if both live under one root and both install AgentRef where needed.
* Different root domains do not share first-party cookies automatically.
* If you gate cookies behind consent, call `window.AgentRef.setConsent('granted')` after opt-in.

## Verify the installation

1. Publish the site.
2. Open a real affiliate link to the live Webflow domain.
3. Confirm `agentref_cid` and `agentref_pid` exist in browser cookies.
4. Add `?agentref_debug=1` and inspect the console.
5. If you use custom Stripe checkout, validate the [Stripe guide](/docs/integration/stripe) end-to-end.

## Troubleshooting

* The script works in code settings but not live: republish the site after saving.
* The script exists but clicks are not verified: confirm the program website in AgentRef matches the Webflow domain.
* Conversions are missing while clicks arrive: you are either using Webflow Ecommerce native checkout or your custom Stripe path still needs the metadata bridge.

## Related docs

<CardGroup cols={3}>
  <Card title="Stripe Checkout" icon="credit-card" href="/docs/integration/stripe">
    Required for custom Webflow-to-Stripe checkout paths.
  </Card>

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

  <Card title="Consent and GDPR" icon="shield" href="/docs/tracking/consent-gdpr">
    Coordinate AgentRef with your consent manager.
  </Card>
</CardGroup>
