virling Pricing Self-host Demo Changelog Agencies GitHub Start free trial
blog / 2026-12-02

What tool shows revenue by referrer and UTM campaign?

By Devendra Variya, co-founder of Virling. Published 2026-12-02.

Virling shows revenue by referrer and by UTM campaign. It reads payments from Stripe, Paddle, Polar, Lemon Squeezy, Shopify and the other providers it supports, joins each payment to the visit before it, and lists every referring site and every utm_campaign with its visitors, revenue and revenue per visitor. Both are tabs on the Channels card: Source for referrers, Campaign for campaigns and tracked links.

A traffic report lists referrers and campaigns by visits. Revenue needs the payment joined to the visit, which is what the steps below set up.

Set it up

  1. Add the script before </head> on every page. It records the referrer host and UTM tags of each visit and sets the virling_vid visitor ID cookie, as in the tag below.
  2. Connect your payment provider under Setup, Connect payments, with a read-only key where the provider allows one. Which key to create lists each provider.
  3. Pass the visitor ID at checkout. Checkout links on buy.stripe.com, buy.polar.sh, checkout.dodopayments.com and *.lemonsqueezy.com get it from the script. A checkout your server creates needs one field. See link checkout to visits.
  4. Tag the links you share with utm_source, utm_medium and utm_campaign, or make a tracked link: on the Campaign tab, click + Tracked link, pick where you will share it and the page, and copy the short link. See tracked links.
  5. Read the answer. On the Channels card, the Source tab lists each site that sent visitors, such as news.ycombinator.com or a partner's blog. The Campaign tab lists each utm_campaign and tracked link, and the Keyword tab each utm_term. Every row has visitors, revenue, revenue per visitor and a chip that compares it with your site average. Click a row to filter the whole dashboard by it.

The script tag, on every page:

<script defer src="https://app.virling.com/v.js"
  data-site="yourdomain.com"></script>

See revenue for every referrer and campaign

Virling joins each payment to the visit before it and shows revenue by referrer, campaign and page. Self-host it free, or use the hosted version.

Start free trial See the demo

How a payment gets its referrer and campaign

Each payment is credited to one visit, and takes that visit's referrer and campaign. By default that is the latest visit in the last 90 days that was not Direct, so someone who clicked a newsletter link and came back later by typing your address still counts for the newsletter campaign. You can switch to first touch or last touch. See model and lookback window.

  • Referrer host, not the full URL. Virling stores the host, such as reddit.com, not the page. To tell two posts on the same site apart, give each link its own utm_campaign.
  • Aliases share a row. t.co and twitter.com show as x.com, lnkd.in as linkedin.com, and every Google domain except Gemini as google.com.
  • Renewals keep the first payment's campaign. A renewal has no visit, so it takes the referrer and campaign of the customer's first payment.
  • Retention per referrer and campaign. The Retention page has Referrer and Campaign tabs too, with how many customers still pay and what each is worth so far. See retention by channel.

Doing it without Virling

Store the referrer and UTM tags of each visitor's first landing in a cookie, copy them into your checkout's metadata, and export payments each month. A pivot table by campaign gives revenue per campaign, and dividing by the visits your traffic tool shows for the same campaign gives revenue per visitor. It breaks when a buyer comes back by a different route before paying, when renewals carry no tags, and when campaign names are spelled two ways. For naming that keeps reports clean, read which UTM parameters to use.

Related: revenue by campaign, utm_source vs utm_medium and why a referrer goes missing.

Frequently asked questions

Does Virling show the full referrer URL?

No, only the host, such as reddit.com. Tag each link with its own utm_campaign to tell posts on the same site apart.

What decides the channel when a visit has a referrer and UTM tags?

A paid or email utm_medium, such as cpc or email, decides first. Otherwise the referrer host decides, and utm_source is used only when there is no referrer.

Can I see revenue for a short link?

Yes. A tracked link shows on the Campaign tab under its name, with clicks, visitors and revenue.

Why does a campaign show visitors but no revenue?

Its visitors have not paid yet, checkout is not carrying the visitor ID, or the payment was credited to a later visit that was not Direct. Open a payment to see which visit got the credit.

See which referrers and campaigns pay

Virling is open source under AGPL. Self-host it free, or use the hosted version; see pricing. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.

Start free trial See the demo