Before you start
- Set the program website in AgentRef to the same root domain your WordPress site uses.
- Copy the exact script snippet from
Settings -> Integration. - If WordPress is only your marketing site and checkout happens on
app.example.com, install AgentRef on both surfaces.
Recommended installation
- Plugin or header injector
- Child theme
If your site already uses a site-wide header-code plugin or theme option, paste the AgentRef script into the global head field.
Checkout compatibility on WordPress
| Checkout pattern | Recommendation |
|---|---|
| Stripe Payment Links, Buy Buttons, or Pricing Tables embedded on WordPress pages | Supported directly. |
| Custom Stripe Checkout Session created by your own WordPress plugin or backend code | Supported, but you must follow the Stripe guide. |
| WooCommerce or another native WordPress ecommerce checkout | Not an automatic AgentRef checkout surface today unless you explicitly bridge attribution into Stripe metadata or report conversions server-side. |
Multi-domain and consent notes
- Shared subdomains under one root can share AgentRef cookies if the script is installed where the journey begins.
- Different root domains cannot share first-party cookies automatically.
- If you use a consent manager, call
window.AgentRef.setConsent('granted')after the visitor opts in.
Verify the installation
Run a published-site test
Add
?agentref_debug=1 or ?agentref_verify=1 to a live page and inspect the result.Validate the checkout path
If you use anything beyond hosted Stripe surfaces, confirm your checkout integration matches the Stripe guide.
Troubleshooting
- The script is visible in WordPress admin but not on the live site: a cache or optimization layer is still serving the old template.
- Clicks arrive but sales do not: this usually means WooCommerce or another plugin owns checkout and does not pass AgentRef metadata into Stripe.
- Cookies exist on the marketing site but not in the app: install AgentRef on both subdomains.
Related docs
Stripe Checkout
Required for custom WordPress-to-Stripe checkout bridges.
Server-Side Tracking
Use this when your commerce stack cannot pass through AgentRef automatically.
Consent and GDPR
Coordinate AgentRef with your cookie banner.