Revenue attribution for digital products
Virling joins each sale of an ebook, template, preset or icon pack to the visit that came before it, so you see which tweet, newsletter or creator brought the money, not just the clicks. Works with LemonSqueezy, Polar, Creem and Dodo Payments, mostly through checkout links you paste into a page.
A digital product is usually a one-off purchase: someone reads a post, clicks through to the sales page and pays $9 or $29 for an ebook, a Notion template, a Lightroom preset or an icon pack in the same sitting. There is no cart to fill, no trial and no renewal, just one checkout link and one payment. Virling sets a visitor ID when someone lands, your checkout link carries it, and each payment is credited to one of that visitor's visits; the digital products guide walks through it.
The questions it answers
- Which launch post sold the most? Product Hunt, Hacker News, Reddit, X or your own blog, by revenue rather than upvotes or visits.
- Which newsletter or creator was worth it? Revenue per sponsor, issue or affiliate post, from the source and campaign on their link.
- Which page turns visitors into buyers? The landing page and the last page seen before paying.
- Do buyers pay on the first visit? Visits before paying and time to convert for each recent customer, so you can tell an impulse buy from one that took a week.
One tweet or one newsletter can carry the month
Sales of a small product rarely spread evenly. A single tweet that gets shared, one mention in someone else's newsletter or a Reddit thread can bring most of a month's sales in two days, and then go quiet. Reddit, Hacker News, Product Hunt and Indie Hackers land in Communities, X and Instagram in Social, and a link tagged utm_medium=newsletter in Email, with revenue per visitor next to each, so the one post that paid stands apart from the busy one that did not.
Links in apps and newsletters often arrive with no referrer, so give each place its own tracked link, a short URL with the tags built in. With the default model, last non-direct, a buyer who saw the tweet and came back the next day by typing your address still counts for the tweet.
Connect your payment provider
- LemonSqueezy for digital products: an API key, and the visitor ID passed as checkout custom data. Virling registers a webhook on each store to read it, which needs a public https address.
- Digital products on Polar: an organization access token. Checkout links on
buy.polar.shneed no code; checkout sessions take the visitor ID in metadata. - Digital products on Creem: the one provider here where every checkout is created by your server, since the script does not add the visitor ID to its payment links.
- Dodo Payments for digital downloads: an API key. Static payment links need no code; checkout sessions take the visitor ID in metadata.
- Paddle for digital products: a read-only API key, and the visitor ID passed as
customDatawhen your page opens Paddle checkout.
Which checkout links need no code
| Provider | Checkout links that need no code | Webhook for the visitor ID |
|---|---|---|
| LemonSqueezy | *. | Yes, Virling adds it |
| Polar | buy.polar.sh | No |
| Dodo Payments | checkout. | No |
| Stripe Payment Links | buy.stripe.com | No |
| Creem | None: set virling_vid in the checkout's metadata on your server | Yes, Virling adds it |
That means a seller with one sales page and a Buy button can be set up without writing code: paste the checkout link as the button, and a click carries the visitor ID. A link counts when it is a normal <a href> on a page that runs the script. The two webhooks need Virling on a public https:// address. An overlay, or a checkout you create in code, has to carry the visitor ID itself.
Each provider's payments from the last 90 days are imported on the first run, then new ones every minute. A refunded ebook or template comes off the revenue of the post that sold it. If you also sell subscriptions, renewals keep the channel of the first payment; see Virling for SaaS.
Selling downloads from a WordPress store? See WooCommerce download orders by channel. Selling them from a Shopify store? See Shopify digital product sales by channel. Selling through Payment Links or Stripe Checkout? See Stripe for digital products. For license sales and renewals, see plugins and themes. For course and cohort sales, see online courses.
See which post sold
- Tagged links, one per place. Make a tracked link for each post, newsletter issue and bio, and point it at your sales page. The Campaign tab shows each one by name, and the Source tab splits a channel by source, such as Reddit or a newsletter.
- Partner links. Under Partners, add each creator, affiliate or sponsor and the page to open, and give them the short link. They are ranked by revenue, with visitors, paying customers and refund rate. Copy report link gives a partner a read-only page with only their own numbers. Virling does not pay partners.
- Launch days. Log the day under Launches to see the visitors, new customers and revenue of that day and the day after. Those figures count all traffic on the two days, so use tracked links to tell the places apart.
A made-up example, to show how to read the Campaign tab. A seller shares one $20 template in three places, each with its own link:
| Link | Visitors | Revenue | Revenue per visitor |
|---|---|---|---|
| Reddit post | 1,500 | $120 | $0.08 |
| Newsletter issue | 300 | $240 | $0.80 |
| YouTube bio | 200 | $80 | $0.40 |
Reddit sent five times the visitors of the newsletter and half the revenue, so the newsletter is the one to repeat. Open any sale under Payments to see the visits before it and which one got the credit.
Find out which post sells your product
For sellers of digital products, Virling credits each sale to the post, newsletter or creator that sent the buyer. Self-host it free under AGPL, or use the hosted version with a 14-day free trial.
Why a sale is Unattributed
- The checkout link was in an email or a bio. A checkout link opened from an email, a bio, a QR code or another site carries no visitor ID. Fix: link to your sales page, and put the checkout link there.
- The link had no tag. With no tag and no referrer, as from many bios, apps and newsletters, the visit lands in Direct, so the sale is credited to Direct rather than to the post. Fix: share a tracked link in each place.
- Cookieless mode is on. Without the cookie there is no visitor ID for checkout to carry. Fix: set Visitor cookie to Cookie in site settings and take
data-cookielessoff the script tag. If you need consent first, use Until consent: visitors who accept can be credited.
Unattributed sales still count toward revenue. A fix applies to new sales; earlier ones usually stay Unattributed.
Open source
The code is on GitHub under AGPLv3; run it on your own server for free, or pay for the hosted version.
Frequently asked questions
Which payment providers work for digital products?
LemonSqueezy, Polar, Creem, Dodo Payments and Stripe. Connect one with an API key or token, pass the visitor ID into checkout, and Virling ties each payment to the visit before it. LemonSqueezy and Polar checkout links, Dodo Payments payment links and Stripe Payment Links need no code, since the script puts the visitor ID on the link as it is clicked.
How do I see which newsletter or creator brought a sale?
Share a tracked link, or tag your link with utm_source and utm_medium=newsletter. Every visit gets a channel, source and campaign from its first pageview, and each sale is credited to that visit, so the Source and Campaign tabs show revenue per newsletter, creator or post.
Which checkout links need no code?
LemonSqueezy links on *.lemonsqueezy.com, Polar links on buy.polar.sh, Dodo Payments links on checkout.dodopayments.com and Stripe Payment Links on buy.stripe.com. The script adds the visitor ID when they are normal links on a page that runs it. Creem needs virling_vid set in the checkout metadata on your server.
How do I test that a sale is credited?
Open your site in a private window from a tagged link, such as one ending in ?utm_source=test&utm_medium=test, click your checkout link and pay in the test mode of your provider. Wait a minute, then open the payments list. The payment should show the test source instead of Unattributed, and its journey should start at your tagged visit. The script does not add the visitor ID to Dodo Payments test links or Polar sandbox links, so add it in your own code for those tests.
Does Virling pay my affiliates or creators?
No. Partners tracks each creator, affiliate or sponsor link and ranks them by revenue, with visitors, paying customers and refund rate, and Copy report link shares a read-only page with only their own numbers. Payouts stay with you.
A buyer comes back for a second pack. Which channel gets that sale?
The channel of their first purchase. Any later order from the same customer at the same provider counts as a repeat and copies the credit of the first one when that one was credited, so a reader who bought one ebook from your newsletter and an icon pack a month later adds both sales to the newsletter. Guest orders with no customer ID stand alone.
Full reference: Channels, Tracked links, Unattributed revenue and Renewals in the docs. See pricing for plans.