When this is the right choice
Use it when:- Your site is custom-built and isn’t on the list of supported platforms.
- Your form builder or page builder isn’t supported directly.
- You want to pay affiliates for leads, sign-ups, waitlist entries, demo requests, or trial registrations.
- You’re using a supported platform for payments but want to track form sign-ups as well.
- You need revenue tracked and your checkout is on a supported platform. Check the integrations list first, since a purpose-built setup is always better.
- The conversion happens on a server rather than in someone’s browser, in which case see the developer options below.
What this integration can and can’t track
Before you start
You’ll need:- A live Referly program with at least one affiliate to test with. See setting up your program if you haven’t got that far.
- Access to add code to your website’s pages, or someone who can paste two snippets for you.
- To know which page holds the form you care about.
Add the Referly tracking script
This is what recognises a visitor arriving from an affiliate link and remembers it in their browser for the length of your cookie window. Nothing else works without it. Copy it from Step 1: Tracking clicks. Your program’s own identifier is already filled in whereYOUR_PROGRAM_ID appears:
head section of your site, site-wide if you can, so it’s there wherever an affiliate sends someone. Where that setting lives depends on your platform: look for “custom code”, “header scripts”, “head code”, or “tracking code” in your site settings. On WordPress, see the WordPress guide for four different ways to do it.
Add the form tracking script
This is the piece that does the actual work. Copy it from Step 2: Track Referrals/Sign ups from forms and paste it into the pages that have forms on them, near the bottom, before the closingbody tag.
- Forms that appear later are picked up. Pop-ups, forms that load after the page, and multi-step forms that swap their fields all get tracked, because it keeps watching the page rather than checking once at load.
- No form is counted twice, even though it re-checks the page as things change.
- Visitors who didn’t come from an affiliate link are ignored. The script runs on every submission, but Referly records nothing when there’s no referral in the browser, so your organic sign-ups are untouched.
Tracking sales as well
This integration on its own will never record revenue. That’s a deliberate boundary, not a gap: recording money reliably means hearing it from whatever took the payment, and a form submission can’t tell you a payment succeeded. You have three options, depending on your setup.Pair it with a payment integration
The most common answer. Keep this integration for sign-ups, and add the one that matches your checkout for the money. The two work together on the same visitor: the referral is established once, and both the sign-up and the later sale are credited to the same affiliate.Send conversions from your own server
If your payments run somewhere Referly doesn’t connect to, or your conversion is confirmed on a server rather than in the browser, record it directly instead. See creating a referral through the API, and the universal developer guide for the wider picture. This is the right choice when the customer’s browser isn’t involved at the moment the sale is confirmed, which the form script can never cover.Use a postback URL
If you work with an ad network or partner platform that reports conversions back to you, a postback URL is the usual mechanism. See postback URLs.Test it end to end
Grab a real affiliate link
Open it in a private window
Check the click landed
Submit the form
Check Referly
How Referly decides who gets the credit
When a visitor lands on your site through an affiliate link, Referly records the click and keeps it in their browser for as long as your cookie window allows. When they submit a form, the script reads their email out of it and hands it to Referly along with the referral already stored in that browser. Referly matches the two and credits the affiliate behind the click. That stored referral is the whole mechanism. If it isn’t there, Referly correctly does nothing at all. That’s why a submission from a different browser, a different device, or after the cookie window has expired won’t be credited to anyone. Once someone is credited to an affiliate, that credit stays with them. Later clicks from other affiliates don’t take it over.Limitations to be aware of
- No revenue, ever. This integration records people, not payments. Pair it with something else for sales.
- There has to be a real form. A sign-up flow built entirely from buttons and custom controls, with no form behind it, won’t be picked up.
- There has to be an email field. If your form doesn’t collect an email address, there’s nothing for Referly to identify the person by.
- Embedded forms hosted elsewhere can’t be reached. If your form is inside an embed served from another company’s domain, the script on your page can’t see into it. Check whether that provider has its own Referly integration.
- Anything without a browser is invisible. Sign-ups you create yourself, imports, and server-side registrations aren’t tracked.
- The visitor must submit in the browser they clicked in. Clicking on a phone and signing up on a laptop won’t match.
- Ad blockers, strict privacy settings, and consent banners can stop the tracking script for a share of visitors, as with any affiliate tool.
Troubleshooting
No clicks are recorded at all
No clicks are recorded at all
head section of the page, that you saved and published, and that any caching has been cleared. Then load your site with an affiliate link on the end, in a private window, and check again.Clicks work but form submissions aren't recorded
Clicks work but form submissions aren't recorded
My form is inside an embed from another service
My form is inside an embed from another service
Referrals appear but with no revenue
Referrals appear but with no revenue
The name is missing on referrals
The name is missing on referrals
A pop-up form isn't being tracked
A pop-up form isn't being tracked
A referral wasn't credited even though the person used an affiliate link
A referral wasn't credited even though the person used an affiliate link