Skip to main content
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.
<script
  defer
  src="https://www.agentref.co/api/tracking/script.js?pid=YOUR_PROGRAM_ID"
></script>
  1. 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

FlowStatus with AgentRef
Stripe Payment Links, Buy Buttons, or Pricing Tables directly on Framer pagesSupported directly.
Custom Stripe checkout handled by your own backend or appSupported with the Stripe guide.
External commerce tool that owns checkout without a Stripe metadata bridgeNot automatic.
  • 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

1

Publish the Framer site

Framer custom code only matters on the published site.
2

Run a real referral visit

Open a live affiliate link and confirm agentref_cid and agentref_pid.
3

Check hosted Stripe instrumentation

If the page contains Stripe links or elements, use ?agentref_debug=1 and inspect the console or DOM.
4

Validate the checkout path

If you create custom Checkout Sessions elsewhere, follow the Stripe guide.

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.

Stripe Checkout

Use this if Framer hands off into your own Stripe session-creation backend.

Debug Mode

Inspect hosted Stripe instrumentation and runtime warnings.

JavaScript Snippet

Full script behavior and DOM API reference.