Browser extension revenue tracking with Stripe
To track browser extension revenue from Stripe by channel, the upgrade has to start on your own site. Put the Virling script there, let the extension open your upgrade page, and pass the visitor ID from that page to Stripe. Each payment is then credited to one of the visits that person made to your site before it. Installs, and upgrades whose checkout carries no visitor ID, cannot be linked to a channel. Open source under AGPL, hosted or self-hosted.
Someone may read a launch post, open your landing page, install from the store, use the free version for weeks and then click Upgrade. The store knows the install and Stripe knows the payment, but neither knows the post. This page is for paid Chrome and Firefox extensions that take the money through Stripe on their own site.
What you get
- Each upgrade credited to a channel and campaign. By default a payment goes to the latest visit in the last 90 days that was not Direct, so a Direct visit to the upgrade page does not take the credit from the post that came before it. First touch, last touch and windows of 30, 60 or 365 days are settings, see model and lookback window.
- Posts, videos and listings told apart. The Campaign tab splits the links you tagged, with visitors, revenue and revenue per visitor for each.
- Renewals on the first channel. A charge whose invoice has billing reason
subscription_cyclecopies the channel, referrer, campaign, landing page, country and device of the customer's first payment, matched by Stripe customer ID. Plan changes (subscription_update) and any later charge of the same customer keep that channel too. - Stripe trials kept out of revenue. A trial that starts through Checkout with a total of 0 is never counted as revenue, a payment or a customer. If it started after you connected Stripe, its first charge is credited to the visits before the trial when the charge has no visitor ID of its own.
- Refunds and lost disputes taken off. Stripe events update payments that were already imported.
Set it up for an extension
- Add the site. Click + Add a site and enter your domain, such as
yourextension.com, and its timezone. - Install the script on your site, not in the extension. Paste the tag before
</head>on the landing page, the upgrade page and every other page. Only events from your domain and its subdomains are kept. Thevirling_vidcookie is set on your registrable domain for one year, soyourextension.comandapp.yourextension.comshare one visitor ID. Leave cookieless mode off. - Tag the links to your landing page. Send people to your site first and to the store from there. Use one tracked link per post, newsletter or video, and tag the website link on each store listing with its own campaign, such as
?utm_source=chrome-web-store&utm_medium=referral&utm_campaign=chrome-listing. - Point the upgrade button at your upgrade page. Use a plain link such as
https://yourextension.com/upgrade. Leave UTM tags off it: they would mark the upgrade visit with a source of its own. - Connect Stripe. Create a restricted key with Read on Charges, Checkout Sessions, Customers, Events, Invoices, Subscriptions and PaymentIntents, and paste it under payments. Secret keys are refused. The last 90 days are imported, then new payments every minute.
Carry the visitor ID to the upgrade page
Someone who visited your landing page in the same browser still has the cookie when the extension opens the upgrade page, so nothing has to pass through the extension or the store. Checkout then has to start from that page, in one of two ways.
- Payment Links. A link on
buy.stripe.comneeds no code when it is a normal<a href>on the upgrade page. The script adds the visitor ID asclient_reference_idon the click, unless the link already has one. - Checkout Sessions from your server. Read the
virling_vidcookie from the request your upgrade page makes and setclient_reference_id. If you use that field for something else, such as a license or user ID, put the visitor ID in the session'smetadata.virling_vid.
<!-- In the extension -->
<a href="https://yourextension.com/upgrade" target="_blank">Upgrade</a>
// On your server, when the upgrade page asks for a checkout
const session = await stripe.checkout.sessions.create({
client_reference_id: req.cookies.virling_vid,
line_items: [{ price: "price_...", quantity: 1 }],
mode: "subscription",
success_url: "https://yourextension.com/thanks",
});To check it, connect a restricted key that starts with rk_test_. Create a new browser profile with your extension loaded, open your landing page from a link tagged ?utm_source=test&utm_medium=test, click the upgrade button and pay with a Stripe test card. A minute later the payment should show the test source instead of Unattributed. A private window would not do: it has its own cookies, and extensions are usually off there. A site has one Stripe connection, and test payments stay in your reports after you replace the key with a live one.
What a store listing hides
- The install. It happens in the store. A click from your site to the listing is recorded as an exit with the listing's origin and path, without its query string, so tags on that link are not kept.
- The store search. Someone who finds the extension in the store and never opens your site has no earlier visit. The first visit Virling sees is the upgrade page, and the payment is credited to that visit.
- Links that go straight to the store. A post that links to the listing instead of your site leaves no visit to credit.
- Which clicks came from the listing. Clicks from
chromewebstore.google.comland in Organic search with Google, so only theutm_campaignon the listing's website link splits them out. App marketplace revenue tracking covers this for other stores.
Read which channel brings upgrades
An example with made-up numbers: over 90 days a launch post brings 900 visitors and 6 upgrades at $30 a year, which is $180 or $0.20 per visitor. A video review brings 300 visitors and 9 upgrades, which is $270 or $0.90 per visitor. The post looks better by visits, the video by revenue. A year later the renewals of those customers are credited to the same two rows.
If your extension has a free trial, compare how many trials from each channel turn into payers with the trial to paid calculator, and pick a lookback window longer than the time from the first visit to the first charge.
What stays Unattributed
These payments still count toward revenue, but are not credited to a channel.
- A checkout or Payment Link opened straight from the extension, an email, a QR code or another site, or a Payment Link on a custom domain. None of them carries the visitor ID.
- Checkouts your server creates without the visitor ID, and visitors whose browser blocked the script.
- Payments whose visits are all older than the lookback window.
- Renewals of a first payment that is Unattributed or older than the 90-day import, which are usually Unattributed too.
An upgrade in another browser or on another device has its own cookie and a new visitor ID, so the earlier visit is not found. If people sign in on your site, you can send their email once as an identify event: a Stripe payment with no visitor ID and the same payer email is then credited to that visitor. See Unattributed revenue.
Every Stripe setting is on the Stripe integration page, and Virling for browser extensions covers other payment providers.
Open source
Virling is open source under AGPLv3, and the code is on GitHub. Use the hosted service, or self-host it as one binary with every feature. In a load test on 2026-10-31, in a container limited to one vCPU and 1 GB of RAM, it ingested 100,000 pageviews at 2,829 a second with none failed and a p99 of 34 ms, and used 157 MB of memory after the ingest.
Frequently asked questions
How do I track browser extension revenue from Stripe by channel?
Put the Virling script on your own site, connect Stripe with a read-only restricted key, and have the extension open an upgrade page on your domain instead of checkout. That page passes the virling_vid visitor ID to Stripe, so the payment is credited to one of the visits that person made to your site before it.
Can I link a Stripe Payment Link straight from the extension?
You can, but the script does not run inside the extension, so nothing adds the visitor ID and the payment shows as Unattributed. Open an upgrade page on your own site instead, and put the Payment Link there as a normal link.
Can Virling see installs from the Chrome Web Store or Firefox Add-ons?
No. A click from your site to the listing is recorded as an exit, but the install happens in the store, which Virling does not see. An exit is a click, not an install.
Where does the credit go when someone installs from a store search?
To the first visit Virling can see, which is the upgrade page the extension opened. If the Stripe checkout carries the visitor ID, the payment is credited to that visit, not to the store search.
How are Stripe renewals of an extension subscription credited?
A charge whose invoice has billing reason subscription_cycle is a renewal and keeps the channel of the customer's first payment, matched by Stripe customer ID. If that first payment is Unattributed or older than the first import, its renewals are usually Unattributed too.
Can Virling change anything in my Stripe account?
No. It uses a restricted key with Read permission only and refuses secret keys that start with sk_live_ or sk_test_. It never creates, changes or refunds anything.
Full guides: Stripe in the docs, Set up Virling for a browser extension and Renewals.