Revenue attribution for AI apps: which channel brings users who pay.
Virling joins each credit purchase and subscription payment to the visit that came before it, so you see whether X, Product Hunt, Reddit, YouTube or AI assistants bring the users who pay, not only the ones who sign up. Works with Stripe, Polar, Creem and Dodo Payments. Open source, one Rust binary, or hosted.
Most AI apps and AI wrappers give new users free credits or a trial, then charge for a plan or a credit pack once those run out. A launch post can send hundreds of signups who spend the free credits and leave, while a quieter channel sends fewer users who keep topping up. Signups by channel ranks the launch first. Revenue by channel shows which one paid for your model costs.
Free credits, trials and top-ups
Virling counts payments from your payment provider, not signups or usage. A user who only spends free credits is a visitor, not a customer, and adds nothing to a channel's revenue.
- Free trials: a trial start has nothing charged, so Virling keeps it 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. Trial starts are read from Stripe, Polar, Dodo Payments and Creem.
- One-off top-ups: a credit pack bought through checkout is a payment like any other. Pass the visitor ID into checkout and a customer's first pack is credited to the visit that led to it, under the site's attribution model. Later packs keep that channel.
- Subscriptions: the first payment is credited to its visit, and every renewal after it keeps that channel.
Each site has one attribution model. Last non-direct is the default, so a user who found you on Reddit and came back days later by typing your address is credited to Reddit, not Direct. The lookback window can be 30, 60, 90 or 365 days.
Top-ups and renewals credited to the first channel
A renewal takes the attribution of the customer's first payment. If someone subscribed after a visit from X, every renewal is credited to that X 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.
- AI apps on Stripe: a renewal is an invoice with billing reason
subscription_cycle. - Polar for AI apps: an order with billing reason
subscription_cycle. - AI plans sold through Dodo Payments: a payment on a subscription that already had a paid payment before it.
- Creem for AI apps and wrappers: any payment from a customer who already had a payment before it, with no other case.
With every provider, any payment after a customer's first counts as a renewal, so a later one-off top-up keeps the first channel too. If the first payment is Unattributed, the top-up falls back to its own visitor ID, so pass the ID on every checkout. The Retention page groups each customer by the channel, referrer and campaign of their first payment, and counts every later payment, top-ups included, in that channel's net LTV. So you see which channel brought the users who keep buying credits.
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.
Credit packs, subscriptions, upgrades and refunds
This is the same on Stripe, Polar, Creem and Dodo Payments, except where a provider is named.
| What happens | How Virling credits it | Where it shows |
|---|---|---|
| First credit pack | To a visit of the visitor ID that checkout carried, by default the latest visit in the last 90 days that was not Direct | Channels, Payments, New customers and Retention |
| Later credit pack | A renewal, as any payment after the customer's first. It keeps the channel of that first payment, whether a pack or a plan | Channels and Payments, marked as a renewal, and in net LTV on Retention |
| Subscription | A first payment is credited like a first credit pack, and every renewal keeps its channel. After a free trial, a first charge with no visitor ID of its own is credited to the visits before the trial. On Stripe, only for trials that started after you connected | Channels, Payments, New customers and Retention. Renewals show like a later credit pack, and so does the first charge after a trial on Stripe and Polar |
| Upgrade | The charge keeps the channel of the customer's first payment | Same as a later credit pack |
| Refund | Lowers its payment, on that payment's date. The credit stays with the same channel. How disputes and refunds on older payments are read differs, so see your provider's page in the payments docs | Refunded on the Channels card, the refunded filter on Payments, and refund rate and net LTV on Retention |

See which channel brings users who pay
For AI apps that sell credits or subscriptions. Virling is open source under AGPL: self-host it free, or use the hosted version with a 14-day free trial.
X, Product Hunt, Reddit, YouTube and AI assistants
Every session gets one channel from its first pageview, and the referrer is kept too, so each source shows on its own row:
- Social: X (
x.com,t.co), YouTube, LinkedIn, TikTok and others. - Communities: Product Hunt, Reddit, Hacker News, Indie Hackers and others.
- AI: visits from ChatGPT, Perplexity, Claude, Gemini, Copilot and DeepSeek.
Links in your own posts can carry utm_source and utm_campaign, so a launch, a thread or a video gets its own revenue line.
Visits from AI assistants
An assistant that recommends your app sends a visit only when someone clicks the link. Where that visit lands depends on what the click carries:
- Lands in AI. The referrer is
chatgpt.com,chat.openai.com,perplexity.ai,claude.ai,gemini.google.com,copilot.microsoft.comorchat.deepseek.com. With no referrer, autm_sourcesuch aschatgpt,perplexityorclaudecounts too. - Lands in another channel. An assistant whose site is not on that list is Referral. A Google or Bing results page is Organic search, AI answers on it included. A paid or email
utm_mediumwins over the referrer, so a link taggedcpcis Paid. - Arrives as Direct. A visit with no referrer and no tag, as when an assistant's app drops the referrer or someone copies the address from an answer. It cannot be told apart from a typed address, so read the AI channel as a minimum.
To read revenue per visitor for them:
- Split AI by assistant. On the Channels card, click AI, then open the Source tab. Each row has visitors, revenue and revenue per visitor, with a chip against your site average.
- Check New customers. Revenue counts on the payment date, so top-ups and renewals from users an assistant brought earlier are in it too. New customers leaves renewals out.
- Do not read the Direct row as assistants. It mixes them with typed addresses and bookmarks. By default a buyer who came from ChatGPT and returned by typing your address is credited to AI; one whose only visits were Direct is credited to Direct.
- Wait for enough visits. With few visitors, one purchase moves the number a lot, so use Last 90 days. Is AI search traffic worth anything? has a worked example.
Ask an assistant which channel pays
Virling serves a read-only MCP server, so an AI assistant can read your reports and answer questions such as "which channel made the most money last month?". Claude, ChatGPT and Claude Code sign in with OAuth, and other clients can use an API key. Hosted Virling is in the Claude directory. The setup is in ask an assistant which channel pays.
get_breakdown: visitors and credited revenue per channel, referrer, campaign, landing page, country or device.get_channel_verdicts: one plain line per channel against the period before: what earned most, what to double, what earned nothing.get_retention: customers, still paying, net LTV and 30-day churn per first-payment channel.list_payments: payments with the visit each one was credited to.
Frequently asked questions
Do free credits count as revenue?
No. Virling counts only payments from your payment provider. Free credits involve no payment, so a user who only spends them counts as a visitor, not a customer, and their channel gets no revenue from them.
Which channel gets credit for a credit top-up?
The channel of the customer's first payment. With every provider, any payment after the first counts as a renewal, so a one-off top-up, a renewal and a plan change all keep that channel. If the first payment is Unattributed, the top-up falls back to its own visitor ID.
Can I ask an AI assistant which channel pays?
Yes. Virling serves a read-only MCP endpoint. Connect it to Claude, ChatGPT or Claude Code, sign in, and ask which channel, referrer or campaign brought the most revenue.
Does moving from credits to a subscription change the channel?
No. Any payment after a customer's first keeps the channel of the first one, so a user who bought a credit pack first keeps that pack's channel when they subscribe. Customers are matched by the provider's customer ID. With a new customer ID they are a new customer, credited from their own visits.
Why do some visits from AI assistants show as Direct?
A visit with no referrer and no utm_source has nothing that names the assistant, so it lands in Direct. Visits referred by a known AI host, or with no referrer and a utm_source such as chatgpt or perplexity, get the AI channel. An assistant whose site is not a known AI host shows as Referral.
Full reference: Renewals, MCP server and Link checkout to visits in the docs. Plans and the free trial: pricing.
Related reading
- Track Stripe revenue by traffic source in an AI-built app
- Product Hunt launch revenue: how to measure it
- X (Twitter) revenue tracking for founders who build in public
Integrations: Stripe, Polar, Creem and Dodo Payments. Billing another way? See AI apps sold through LemonSqueezy, AI subscriptions and credit packs on Paddle or AI mobile apps on RevenueCat.