Before you start
- Set the program website in AgentRef to the same root domain your Wix 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 through Wix custom code
- Open the Wix Editor for your site.
- Go to
Settings -> Custom Code. - Click
Add Custom Code. - Choose
All Pages. - Choose placement in
Head. - Paste the AgentRef script:
- Apply the change and publish the site.
Wix custom code runs on the published site, not in editor preview.
Checkout compatibility on Wix
| Flow | Status with AgentRef |
|---|---|
| Stripe Payment Links, Buy Buttons, or Pricing Tables on Wix pages | Supported directly. |
| Custom Stripe checkout outside Wix Stores | Supported with the Stripe guide. |
| Wix Stores or another Wix-native ecommerce checkout | Not an automatic AgentRef attribution surface today. |
Multi-domain and consent notes
- Shared subdomains under one root work best when AgentRef is installed on both sides of the journey.
- Different root domains cannot share first-party cookies automatically.
- If you use a cookie banner, call
window.AgentRef.setConsent('granted')after opt-in.
Verify the installation
- Publish the site.
- Visit the live Wix domain through a real affiliate link.
- Confirm
agentref_cidandagentref_pidin browser cookies. - Add
?agentref_debug=1and inspect the console. - If you use custom Stripe checkout, verify the Stripe guide path too.
Troubleshooting
- The code is saved in Wix but not live: publish the site again after the change.
- Clicks appear but no conversion does: you are likely in a Wix-native checkout path or missing the Stripe metadata bridge.
- Cookies disappear between marketing site and app: install AgentRef on both subdomains and keep them on one root domain.
Related docs
Stripe Checkout
Required for custom Wix-to-Stripe flows.
Server-Side Tracking
Fallback when the platform-owned checkout cannot pass AgentRef automatically.
Consent and GDPR
Coordinate AgentRef with your privacy banner.