Which channel brings SaaS customers who stay.
Virling joins each subscription payment to the visit that came before it, then follows the customer through trial, renewals and churn. Trial conversions, renewals, retention and MRR are all credited to the channel that first brought each customer. Open source, one Rust binary, or hosted.
The demo opens on Retention, where customers are grouped by the channel of their first payment, with how many are still paying and net LTV. It is sample data for a made-up invoicing tool, not a customer.
A SaaS payment rarely follows the visit that earned it. People sign up for a trial, pay weeks later and renew for years. Virling credits each paying customer to the visit that brought them, and keeps that credit for every renewal after.
Questions it answers
- Which channel brought paying customers this week? The Channels card lists visitors, revenue and revenue per visitor for each channel, with Source and Campaign tabs behind it.
- Why did revenue move? When revenue changes by at least 20% and $20 against the previous period and one channel explains at least 40% of the move, the Why revenue moved line on the Overview names it.
- Which channel brings customers who stay? The Retention page groups customers by the channel of their first payment, with how many are still paying, net LTV and 30-day churn.
- What is MRR now, and how much of it is from new customers? MRR is on Latest payments, and Customers who stay adds what the customers from the range pay per month now.
- Where do people drop between visit and paid? The Funnel tab of the Goals card shows Visit, Signup, Checkout started and Paid, with the drop between steps.
- How long does a channel take to pay? The Time to pay card shows the median time from first visit to first payment, for each channel with at least three first payments in the range.

Trial to paid, by channel
A free trial starts with nothing charged, so there is no payment to carry the visitor ID from checkout. Virling records the trial start apart from payments and never counts it as revenue, a payment or a customer. When the trial converts, a payment with no visitor ID of its own is credited from the visits before the trial started.
- Stripe: trial starts come from
checkout.session.completedevents with a total of 0, from the time Stripe was connected. - Polar: $0 orders with billing reason
subscription_create. - Dodo Payments: $0 subscription payments.
Each site has one attribution model. Last non-direct is the default. First touch credits the earliest session in the lookback window and fits longer buying cycles. The window can be 30, 60, 90 or 365 days. Changing either rebuilds attribution for the whole site, history included.
Renewals keep the first source
A renewal takes the attribution of the customer's first payment. If someone subscribed after a visit from Reddit, every renewal is credited to that Reddit visit, even though the renewal itself has no visit. Upgrades and other plan changes count as renewals too, so they keep the first payment's channel.
Retention and LTV by first source
The Retention page groups each customer by the channel, referrer and campaign of their first payment, and shows which of them keep paying. A channel that sends many signups who leave after a month can look best on a revenue-this-month view and still be worth less than a smaller channel whose customers stay for a year.
- Customers acquired and how many are still paying today.
- First-payment revenue, refunded amount and net LTV, every payment so far net of refunds.
- Avg LTV, refund rate and 30-day churn.
- Each source's share of customers next to its share of customers still paying.
A customer is still paying while the provider reports a live subscription for them, such as active, trialing or past_due on Stripe. A subscription cancelled at the end of its period stays live until the period ends. Without subscription access, Virling falls back to payment recency.
MRR
Once an hour Virling reads each subscription's price, currency and billing interval with the same read-only key. MRR is the sum of those prices per month, converted to USD, over subscriptions that are live, past any trial and not ended. It is the list price before discounts and tax. MRR shows on Latest payments, and the retention view adds what the customers from a date range pay per month now.
See which channel brings paying SaaS customers
For SaaS founders who bill subscriptions and want trials, renewals and retention by first source. Virling is open source under AGPL: self-host it free, or use the hosted version with a 14-day free trial.
SaaS billing providers
Each provider marks renewals its own way. Virling reads them all into the same model:
- Stripe Billing: the invoice's billing reason is
subscription_cycle. - Paddle subscriptions: the origin is
subscription_recurring,subscription_updateorsubscription_charge. - Polar for SaaS: the order's billing reason is
subscription_cycle. - SaaS on LemonSqueezy: a subscription invoice with billing reason
renewal. - Dodo Payments subscriptions: the subscription already had a paid payment before it.
- Creem as merchant of record for SaaS: the customer already had a payment before it.
Polar and Creem need the optional subscriptions:read scope, and Paddle the optional subscription.read permission, for live subscription status. Without it, their customers use payment recency and the page says so.
Set it up
- Add the script. Click + Add a site, enter your domain and timezone, and paste the tag before
</head>on every page of your marketing site and your app. Both share thevirling_vidcookie across subdomains. Leave cookieless mode off. - Connect your billing provider. Pick it under payments, paste the key and click Connect and backfill. Virling imports the last 90 days, then checks for new payments every minute. It never creates, changes or refunds anything.
- Pass the visitor ID to checkout. Read it from the
virling_vidcookie on your server and set it in the field your provider uses, listed below. - Track signups and trials. Send
virling("goal", "signup")after the signup form succeeds andvirling("goal", "trial")when a trial starts.
Where the visitor ID goes for each billing provider:
- Stripe:
client_reference_idon the Checkout Session, ormetadata.virling_vidon your own PaymentIntent. Payment Links onbuy.stripe.comneed nothing. - Paddle:
customDatain Paddle.js, orcustom_dataon a transaction your server creates, with the keyvirling_vid. - Polar:
metadata.virling_vidon the checkout session. Checkout links onbuy.polar.shneed nothing. - LemonSqueezy:
checkout_data.custom.virling_vidon checkouts you create. Checkout links on*.lemonsqueezy.comneed nothing. - Dodo Payments:
metadata.virling_vidon the checkout session. Static payment links oncheckout.dodopayments.comneed nothing. - Creem:
metadata.virling_vidon the checkout. - RevenueCat: the customer attribute
virling_vid, set before the purchase. New payments arrive by webhook, and subscription payments from before you connected are not imported.
Links that need nothing must be normal <a href> links on a page that runs the script. The code for each provider is in Link checkout to visits, and the checkout snippet generator writes it for you. The full walkthrough is Set up Virling for a SaaS product.
What to know
- The first payment must be in Virling. Payments older than the 90-day backfill are not imported, so renewals of subscriptions that started before that are Unattributed.
- Customers are matched per provider. A customer who moved from one provider to another counts as two customers.
- Until a site has 60 days of payments, the Retention page leads with refund rate and 30-day churn instead of LTV.
Frequently asked questions
Does a free trial count as revenue?
No. Virling keeps a trial start apart from payments and never counts it as revenue, a payment or a customer. It uses it only for credit: a later payment of that customer with no visitor ID of its own is credited from the visits before the trial started.
Which channel gets credit for a renewal?
The channel of the customer's first payment. A renewal copies the first payment's channel, referrer, campaign, landing page, country and device, even years later.
How is MRR calculated?
From each live subscription's price, currency and billing interval, read once an hour with the same read-only key. MRR is the sum per month, converted to USD, over subscriptions that are live, past any trial and not ended. It is the list price before discounts and tax.
How do annual plans count in MRR?
MRR is per month, so a yearly plan counts as one twelfth of its price. The whole payment still counts as revenue on the day it was paid. An annual customer is still paying while the provider reports a live subscription. Without subscription access, Virling goes by payment recency, and a customer with only one payment is taken to pay every 30 days, so give the key subscription access if you sell annual plans.
Which channel gets credit for an upgrade?
The channel of the customer's first payment. Upgrades and other plan changes count as renewals, so they keep that channel: subscription_update on Stripe, Polar and Paddle, updated on LemonSqueezy, and any later payment of the subscription on Dodo Payments.
What happens when a customer moves to another billing provider?
Customers are matched per provider by the provider's customer ID, so a customer who moved from one provider to another counts as two customers. A payment on the new provider does not take the channel of the first payment on the old one, so it needs a visitor ID of its own to be credited. You can connect more than one provider to the same site.
Why do some payments stay Unattributed?
Most often no visitor ID reached checkout, because the server did not pass it or a payment link was opened from an email, a QR code or another site. Other causes are cookieless mode, no visit inside the lookback window, a visit that was never tracked, and a renewal whose first payment is Unattributed or older than the backfill. The payment still counts toward revenue. Payments made before a fix usually stay Unattributed, and new ones are credited.
Full reference: Renewals and Retention by channel in the docs. Plans and the free trial: pricing.