Revenue attribution for membership sites and paid communities
Members find you through a podcast, a newsletter, a Reddit thread or a friend's post, join months later and pay every month after. Virling joins each member's first payment to the visits before it, then credits every renewal to that same first channel, so you see which channel brought each paying member and what they have paid since. Works with Stripe, Polar, LemonSqueezy and Paddle. Open source, one Rust binary, or hosted.
A membership is paid for again and again, but only the first payment follows a visit. The payment provider records each charge, the analytics tool records the visits, and neither knows about the other. Virling joins them: a visitor ID set when someone lands, passed into checkout, matched to that visitor's sessions when the first payment comes in, and carried to every renewal after.
The questions it answers
- Which channel brings paying members? Revenue and paying members per channel, source, campaign and landing page.
- Which channel brings members who stay? Members still paying, net LTV and 30-day churn by the channel of their first payment.
- Which join page converts? Visitors, revenue and revenue per visitor for each landing page.
- Which partner was worth it? Revenue, paying members and refund rate per affiliate or creator link.
What to track
- The join page. Add the Virling script to your site, including the sales or join page. Every visit gets one channel from its first pageview: Paid, Email, AI, Organic search, Communities, Social, Referral or Direct. Send
virling("goal", "signup")when someone joins a free tier or waitlist, and the Goals card shows a funnel from visit to signup to paid. - Checkout. Pass the
virling_vidcookie into checkout, or use a hosted checkout link that the script tags for you. A goal withcheckoutin its name, sent when someone opens checkout, adds a Checkout started step to the funnel. - Renewals. Nothing to add. Each provider marks renewals its own way, and Virling reads them all into one model: a renewal takes the attribution of the member's first payment. See Renewals in the docs.
- Refunds. Nothing to add either. Refunds lower a payment's revenue once Virling reads them, so a channel full of refunds stands out.
Set it up in three steps
- 1. Add the script. One line in the head of every page on your site. See the script in the docs.
- 2. Connect your payment provider with an API key:
- Stripe for membership sites: Payment Links need no code, since the script adds the visitor ID on click. For a Checkout Session you create on your server, pass the cookie as
client_reference_id. - Polar: an organization access token with
orders:readandrefunds:read, plussubscriptions:readfor retention. Checkout links need no code; checkout sessions take the visitor ID in metadata. - LemonSqueezy: an API key, which LemonSqueezy cannot make read-only. Checkout links need no code; for checkouts you create on your server, set
checkout_data.custom.virling_vid. Virling registers a webhook on each store to read it, which needs a public https address. - Paddle: an API key with
transaction.readandadjustment.read, plussubscription.readfor retention. Pass the visitor ID ascustomDatawhen you open Paddle.js checkout.
- Stripe for membership sites: Payment Links need no code, since the script adds the visitor ID on click. For a Checkout Session you create on your server, pass the cookie as
- 3. Make a test payment from a page that runs the script, wait for the next sync, and check that it shows a channel instead of Unattributed. See Link checkout to visits.
What the dashboard shows
The dashboard lists visitors, revenue and revenue per visitor for each channel, source, campaign and landing page, with the share of each row's payments that were refunded. Renewals count toward the channel of the first payment, so a podcast that brought members two years ago still shows the revenue they pay today.

The Retention page groups members by the channel, referrer and campaign of their first payment: members acquired, how many are still paying, first-payment revenue, refunded amount, net LTV, average LTV, refund rate and 30-day churn. A member is still paying while the provider reports a live subscription for them; a subscription cancelled at the end of its period stays live until the period ends. MRR, the list price of live subscriptions per month in USD, shows on Latest payments. Until a site has 60 days of payments, the Retention page leads with refund rate and 30-day churn instead of LTV.
Communities run on many hosts. A visit from reddit.com or indiehackers.com counts as Communities, and one from discord.com or slack.com as Social. Links shared inside apps often arrive with no referrer, so tag the ones you control with utm_source and utm_campaign, or make a tracked link. Community revenue tracking and Discord revenue tracking walk through the tags.
Each site has one attribution model. Last non-direct is the default; first touch credits the earliest session in the lookback window of 30, 60, 90 or 365 days. Saving either setting rebuilds attribution for every payment, history included.
See which channel brings members who stay
For membership sites and paid communities. Virling is open source under AGPL: self-host it free, or use the hosted version with a 14-day free trial.
What to know
- The first payment must be in Virling. Payments older than the 90-day backfill are not imported, so renewals of memberships that started before that are Unattributed. They still count toward revenue.
- Members are matched per provider by the provider's customer ID. A member who moved from one provider to another counts as two.
- A member who pays from a link in an email or a DM, without visiting your site first, has no visit to credit and is Unattributed.
- Virling does not manage access, gate content or run the community itself; keep your membership platform for that.
Open source, hosted or on your server
Virling is open source under AGPLv3, with the source on GitHub. Run it yourself as one binary with embedded storage, see self-host, or let us host it.
Frequently asked questions
Which channel gets credit when a member renews?
The channel of the member's first payment. A renewal copies the first payment's channel, referrer, campaign, landing page, country and device, even years later and even though the renewal itself has no visit. Upgrades and other plan changes keep it too.
Which payment providers work for memberships?
Stripe, Polar, LemonSqueezy and Paddle, among others. Connect one with an API key, pass the visitor ID into checkout, and Virling ties each first payment to the visits before it. Stripe Payment Links, Polar checkout links and LemonSqueezy checkout links need no code: the script adds the visitor ID.
How do I see which channel brings members who stay?
Open the Retention page. It groups each member by the channel, referrer and campaign of their first payment and shows how many are still paying, net LTV, refund rate and 30-day churn, so a channel whose members leave after a month stands apart from one whose members stay.
Do refunds come off a channel's revenue?
Yes. Refunds lower a payment's revenue once Virling reads them, and the Channels card shows the share of each row's payments that were refunded in whole or part.
What about members who joined before I set up Virling?
Their renewals are Unattributed when the first payment is older than the 90-day import, since there is no first payment to copy the channel from. They still count toward revenue.
Is Virling open source?
Yes. Virling is open source under AGPLv3. You can run it yourself as one binary with embedded storage, or use the hosted version.
Full reference: Renewals, Retention by channel and Unattributed revenue in the docs. Plans and the free trial: pricing.
Related reading
- Community revenue tracking: which Discord, Slack and forum posts bring customers
- Discord revenue tracking: which servers and posts bring paying customers
- How long does a visitor take to become a customer?
Integrations: Stripe, Polar, LemonSqueezy and Paddle. Selling memberships through WooCommerce? See WooCommerce membership revenue tracking. Selling a subscription product? See SaaS. Selling templates or ebooks too? See digital products. Selling a course or cohort alongside the membership? See course sales by channel. Taking clients as well? See coaching and consulting, or Stripe revenue tracking for coaches if they pay through Stripe.