Revenue attribution for mobile apps: which channel brings subscribers.
Virling joins RevenueCat purchases from web paywalls, and from app users linked to a web visit, to the visit that came before them. See which ad, post or search brings paying subscribers, and keep that credit for every renewal. Open source, one Rust binary, or hosted.
App stores report who paid, not where they came from. Virling records the visit to your site, carries its ID to RevenueCat in the virling_vid customer attribute, and credits the purchase to that visit's channel. The mobile app guide covers each step, and the RevenueCat integration page lists every setting.
Store purchases and web purchases
An app can sell in two places, and Virling treats them differently.
- Web purchases. A web paywall on a page that runs the script sells the subscription in the browser, where the visitor ID is already in a cookie. Your server copies it to the RevenueCat customer, so these are the easiest purchases to credit.
- Store purchases. A purchase in the App Store or Google Play happens inside the app, where there is no cookie. It is credited only when the app user was linked to a web visit first. Someone who finds the app by browsing the store has no visit, and their purchase counts toward revenue as Unattributed.
- Store installs. Virling reads payments from RevenueCat, not installs from the App Store or Google Play, so an install with no purchase counts for no channel.
If most subscribers start in the store, the Unattributed share will be large. That share is useful in itself: it shows how much of your growth the web funnel explains. To weigh the store commission against selling on the web, try the App Store fee calculator.
Web-to-app funnels
The ID has to be on the RevenueCat customer before the purchase. A subscriber who came through your site takes one of two roads:
- They buy on the web. Your server reads the
virling_vidcookie when the paywall loads and sets it on the RevenueCat customer. - They sign up on the web, then buy in the app. Set
virling_vidon the customer at signup from your server, or from the app with the RevenueCat SDK'ssetAttributes.
The cookie is set on your registrable domain, so a site on yourapp.com and a paywall on pay.yourapp.com share the same visitor ID. If you sell on the web through Stripe, Paddle or another provider instead, pass the visitor ID into that checkout and connect that provider too.
One funnel from ad to renewal
Follow one subscriber of yourapp.com who buys on the web. The names are examples.
- Ad or post. Your ad links to
https://yourapp.com/?utm_source=google&utm_medium=cpc&utm_campaign=spring. Virling records the visit, not the ad click: nothing is stored until the page loads. - Landing page. The script records the pageview with its referrer, UTM tags, landing page, country and device, and sets
virling_vid.utm_medium=cpcputs the visit in the Paid channel. - Web paywall. On
pay.yourapp.comthe script records another pageview for the same visitor. Your server copies thevirling_vidcookie to the RevenueCat customer before they pay. If they sign up here and buy in the app later, set it at signup instead. - Purchase. The webhook brings the purchase with the visitor ID and the amount in the currency paid. Virling credits it to a visit inside your lookback window, so Payments shows the source and the journey, and the Channels card adds the revenue to the channel.
- Renewal. Each renewal arrives by the same webhook and adds revenue to the Paid channel without a new visit. In Retention, the customer is grouped by that channel.

What is and is not attributed
| Event | Attributed to a channel | Left out or Unattributed |
|---|---|---|
| Web purchase | Yes, when virling_vid was on the RevenueCat customer before the purchase and a visit is inside the lookback window. With another provider, when the visitor ID was passed into that checkout and that provider is connected | Unattributed when no visitor ID was passed |
| In-app purchase | Yes, when virling_vid was set on the app user from a web visit before the purchase | Unattributed when the buyer found the app in the store and never came through your site |
| Store install | No. Installs from the App Store and Google Play are not read | Not recorded, so it counts for no channel |
| Subscription payment from before you connected | No. RevenueCat lists them per subscription only for some stores, so they are not imported | Missing; their later renewals arrive by webhook |
Unattributed payments still count toward your total revenue. They are listed last in charts instead of under a channel. Subscription status is not read, so Retention uses payment recency for RevenueCat customers.
Trials and renewals
A free trial start is kept apart from payments and adds no revenue; the first paid renewal is credited to the visit before the trial. Every later renewal keeps the channel of the customer's first payment, as the renewals rules describe. Customers are matched per provider, so a subscriber who moved from a Stripe web checkout to RevenueCat counts as two customers.
Selling on the web through Stripe? See web to app revenue attribution with Stripe. Selling an AI app? See RevenueCat for AI apps.
Setup
- Add a site in Virling and paste the script tag before
</head>on every page of your marketing site and your web paywall. Leave cookieless mode off: without thevirling_vidcookie there is no visitor ID to pass on. - Set the
virling_vidattribute on the RevenueCat customer before the purchase, from your server or with the SDK'ssetAttributes. The server call needs a key with write access to Customer information, separate from the one you give Virling. - In RevenueCat, create a V2 secret key with read access to Project configuration and Customer information, and read and write access to Integrations. Paste it into Virling. One key covers one project.
- Read the Channels card for revenue per channel, Payments for each purchase and its journey, and Retention for customers by the channel of their first payment.
The RevenueCat webhook needs Virling to be reachable over https. The hosted plan already is.
Frequently asked questions
Can Virling attribute in-app purchases?
Yes, when the app user's virling_vid attribute was set from a web visit before the purchase. In-app purchases from people who never came through your site have no visit to credit, so they count toward revenue as Unattributed.
Does Virling track app installs?
No. Virling reads payments from RevenueCat, not installs from the App Store or Google Play.
Are App Store search ads credited?
Only when the ad sends people to your site first. An ad that opens the store listing leaves no web visit, so the purchase that follows counts toward revenue as Unattributed.
Full reference: RevenueCat, Set up a mobile app and Renewals in the docs. Plans and the free trial: pricing.
Related reading
- RevenueCat web paywall attribution: which channel brought each subscriber
- How to track RevenueCat revenue by traffic source
- App Store fee calculator: compare store commission with a web checkout
Integrations: RevenueCat, Stripe and Paddle. Selling a web app instead: Virling for SaaS.