virling Pricing Self-host Demo Changelog Agencies GitHub Start free trial
blog / 2026-11-18

Referral program tracking: see the revenue referred customers bring

By Devendra Variya, co-founder of Virling. Published 2026-11-18, updated 2026-11-30.

Referral program tracking means giving every customer who refers friends their own link, so you can see which referrals turn into paying customers and how much they pay. Use a tagged link with one utm_source or ref value per referrer, or a tracked short link. Carry the visitor ID into checkout, then join each payment to the visit before it. Each referrer's revenue, renewals included, then shows under their own campaign.

A refer-a-friend program runs on trust: your customers tell people they know, and those people arrive ready to buy. Counting invites sent or links clicked tells you the program is busy. Following each referred visitor to a payment, and to the renewals after it, tells you whether it earns.

Referral programs and affiliate programs

A referral program asks your own customers to recommend you, usually for a credit, a discount or a free month. An affiliate program pays outside partners, such as bloggers, agencies and creators, a commission on the sales they bring. The tracking works the same way, one link per person, but the shape differs: a referral program has many referrers who each send a few friends, often by chat or email where the click carries no referrer header, while an affiliate program has fewer partners who each send more traffic. For affiliates, partner links and payout software, see affiliate revenue tracking, and the commission calculator for affiliates works out what a partner earns per sale and over a customer’s lifetime.

Why referral visits get lost

Friends share links in chats, texts and emails. A click from those usually arrives with no referrer, and with no tag the visit counts as Direct, so the referrer gets no credit. A tag in the link fixes that: Virling reads utm_source, and ref when utm_source is missing, so ?ref=jane-doe keeps the referrer's name when the referrer header is empty. A referrer's name is not a known source, so these visits count in the Referral channel. The full rule order is in channels.

Set it up with Virling

  1. Give each referrer a tagged link. Use one lowercase value per referrer, with hyphens, in both utm_source and utm_campaign, and referral as the medium. Do not use email as the medium even when the link is sent by email, since that moves the visit into the Email channel. If your referral program already adds ?ref= values, keep them and add the same value as utm_campaign. The UTM builder makes the link for you.
    https://yourdomain.com/?utm_source=jane-doe&utm_medium=referral&utm_campaign=jane-doe
    https://yourdomain.com/?ref=jane-doe&utm_medium=referral&utm_campaign=jane-doe
    Virling stores the source with each visit, but its reports group revenue by campaign, which is why the referrer goes in utm_campaign too.
  2. Or create a tracked short link. In Virling, open Links and fill in a name, the page to open, the referrer as the source and Referral as the channel. Virling makes a short URL on your Virling server that redirects with utm_source, utm_medium=referral and the link's id as utm_campaign added, and Links shows its clicks, visitors and revenue. Clicks from bots are not counted, and deleting a link makes its short URL stop working while the visits it already brought stay in your reports. See tracked links.
  3. Add the script. Put the Virling script in the head of every page, with your domain in data-site. It reads the tags on the landing page and sets the visitor ID. See add the script.
  4. Connect a payment provider and pass the visitor ID into checkout. If you use Stripe Payment Links, Polar checkout links or Dodo Payments links, the script adds the ID on click. For a checkout you create on your server, pass the virling_vid cookie, for example as client_reference_id on a Stripe Checkout Session. The setup is in link checkout to visits, and every provider is listed under integrations.
  5. Read the numbers. Pick a range of a few weeks or more. Open the Campaign tab in the Channels card, or Links for short links, and compare visitors, revenue and revenue per visitor for each referrer.

Start free trial

What shows on the payment

Open a payment from the Payments page to see the visits before it. Credited to at the top names the source that got the credit and its channel, Referral for a referral link, and the credited visit in the list is marked and shows its campaign. That is how you check who to reward before you hand out a credit. On the Visitors page, the friend's timeline shows each visit and each payment with its amount, provider and the source it was credited to.

Virling credits each payment under your attribution model, last non-direct by default, inside a lookback window of 90 days by default. If the friend clicked the referral link, then came back later from a search and paid, last non-direct credits the search. Switch the model to first touch in Site settings to see which referrals start journeys. See model and lookback window.

Renewals stay credited to the referral

A referred friend who subscribes keeps paying long after the click. A renewal has no visit of its own, so Virling gives it the attribution of the customer's first payment: its channel, referrer, campaign, landing page, country and device. Upgrades and other plan changes count as renewals too. A referral that brought a yearly subscriber who renews keeps counting toward that referrer every time they pay.

This needs the first payment in Virling and a customer ID from the provider. Payments older than the 90-day backfill are not imported, so renewals of subscriptions that started before that show as Unattributed. The rules per provider are in renewals, and retention by channel uses the same rule for lifetime value.

An example: one quarter of referrals

Example data, made up to show the method: an imaginary booking app at $39 a month gives each referrer a $30 credit when a friend pays. Invites sent come from the app's own referral tool, since Virling does not send invites. Signups are identify events from the trial form, and paying customers and revenue are payments Virling credited to referral links, renewals inside the quarter included. Each row is the month the friends signed up, and every paying friend stayed subscribed to the end of the quarter.

MonthInvites sentSignupsPaying customersRevenue in the quarterRewards paidNet revenue
July418379$1,053$270$783
August365317$546$210$336
September4884412$468$360$108
Quarter1,27111228$2,067$840$1,227

September sent the most invites and brought 12 of the 28 paying customers, yet it netted $108, because its friends had paid once by the end of the quarter while July's had paid three times. Each referred customer pays $39 a month against a one-time $30 reward, so the first payment covers the reward and every renewal after it is net revenue. Judge a month of referrals over a range long enough for renewals to come in. To plan the reward and see where it breaks even, put your own rates into the referral program calculator.

What Virling does not do

Virling does not issue referral codes, credits, discounts or payouts, and it does not invite customers to refer. Keep whatever runs your rewards. Virling shows which referral links turned into paying customers and how much they paid, so you can check what your program reports and decide who earned a reward.

Friends who pass on your name without the link are not in any referral row. How to track word of mouth revenue pairs the tracked links with what buyers say. If customers share their link in a group you run, measure that community on its own.

Frequently asked questions

How do I track revenue from customer referrals?

Give each referrer their own link: a tagged link with their name in utm_source or ref and in utm_campaign, or a tracked short link from the Links page. Pass the visitor ID into checkout so each payment joins the visit before it. The Campaign tab then shows the visitors and revenue each referrer brought.

Should a referral link use utm_source or ref?

Either works. Virling reads utm_source, and ref when utm_source is missing. Pick one lowercase value per referrer and also put it in utm_campaign, since the Campaign tab is where Virling groups visitors and revenue.

How is a referral program different from an affiliate program?

A referral program asks your own customers to tell friends, usually for a credit or discount. An affiliate program pays outside partners a commission on sales. The tracking is the same, one link per person, but referrers are many and small while affiliates are few and larger.

Do renewals still count toward the referral?

Yes. A subscription renewal takes the attribution of the customer's first payment, so if the first payment was credited to a referral link, every renewal and plan change is credited to it too, even though the renewal itself has no visit.

Does Virling pay referral rewards?

No. Virling does not issue credits, discounts or payouts to referrers. It shows which referral links brought paying customers and how much they paid, so you can decide who earned a reward.

Why does a referral sale show another channel in Virling?

Virling credits each payment under your attribution model, last non-direct by default, inside a 90-day lookback window. If the friend clicked the referral link but later came back from a search and paid, the search visit gets the credit under last non-direct. Switch to first touch in Site settings to see which referrals start journeys.

See which referrals bring paying customers

Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.

Start free trial See the demo