Open-source marketing attribution: what to check
By Devendra Variya, co-founder of Virling. Published 2026-11-25.
Open-source marketing attribution is software whose code you can read and run yourself, and which links each payment to the visit that brought the buyer. Before you pick a tool, check seven things: its licence, whether the hosted and self-hosted versions run the same code, where payment keys are kept, which services it needs, how you back it up, how you get your data out, and how it shows payments it could not match. Below is what to ask for each, how Virling answers, and where Virling falls short.
If the term is new to you, start with what revenue attribution is. This page is about judging the software. For server size, cost and upkeep, read what self-hosted analytics takes.
1. The licence
What to check: find the licence file in the repository rather than trusting the word "open" on a home page. Some projects publish their code under terms that limit who may use it, and some keep part of the product in a separate folder with its own licence. Ask which features the licence covers, and what you must share if you change the code.
Virling: the licence is AGPL-3.0, and self-hosting includes every feature. You can run it for your own business or your clients. If you change the code and run that version as a service, share your changes.
2. Hosted and self-hosted: the same code?
What to check: whether the version you can download is the one the company runs. A self-hosted edition that lags behind, or leaves out the revenue reports, is closer to a trial. Look at the release dates, and compare the feature list of each version.
Virling: the hosted plan runs the same open-source code, so the script, payment connections and checkout linking work the same way. What differs is who does the work: hosted plans have billing, a monthly event allowance and AI answers with no API key to add, while on your own server you bring your own AI keys. Self-hosted teams stop at three users. Importing traffic history from other tools uses commands on the server, so hosted accounts cannot do it. The main branch can be ahead of the latest release.
3. Where payment keys are kept
What to check: a revenue tool holds a key to your payment account, which makes it more sensitive than a page counter. Ask for the smallest access it accepts, whether it can move money, how the key is stored, and what happens when you disconnect.
Virling: on your own server, keys stay in your data folder, encrypted with AES-256-GCM. The encryption key is secret.key in the same folder, or VIRLING_SECRET_KEY if you set it. On the hosted plan, keys are encrypted the same way on our server. Virling never creates, changes or refunds a payment, and keys are read-only where the provider allows it: Stripe secret keys are refused in favour of a restricted key. The exceptions are LemonSqueezy, whose keys cannot be limited, and Creem and RevenueCat, whose keys also need permission to add a webhook. Which key to create lists the access for all nine providers. Disconnect deletes the stored key, and to end access fully you also delete or roll it at the provider.
4. The services it needs
What to check: count everything you would have to run: databases, queues, caches, workers. Each one needs updates and its own backup. Then ask which outside hosts the server contacts, and whether it reports home.
Virling: one program with embedded storage, so there is no Postgres, ClickHouse or Redis. In practice you also want a reverse proxy for HTTPS, and an SMTP server if more than one person signs in. There is no telemetry, update check or licence check. It does contact the payment providers you connect, an exchange rate service for payments not in USD, and a few other hosts; the full list is on outbound connections. The first start downloads one database extension. Windows builds are not available yet.
5. Backups
What to check: what you must copy, whether the tool must stop while you copy it, and whether you can test a restore. Ask what cannot be rebuilt: payments can often be imported again, but visits cannot.
Virling: back up one data folder with three things in it: accounts and settings in SQLite, events and attribution in DuckDB, and the secret key. The simplest safe backup stops the server and copies the folder, and events sent during that stop are lost. A documented way to back up while it runs is not available yet. Lose the key and every provider has to be connected again; lose the events and past visits are gone. The commands, with a restore test, are in data, backups, upgrades.
6. Export
What to check: how you would leave. Open code does not help if the data is stuck in it. Ask for raw visits and payments, not only charts, and ask about moving between hosted and self-hosted in both directions.
Virling: this is a weak spot. There is no export button, no export of a hosted account and no retention setting. On your own server the files are standard SQLite and DuckDB databases, so you can open copies with their command-line tools and query every row. On both versions, the read API returns totals, breakdowns and payments as JSON, but not raw events in bulk. Moving from hosted to your own server leaves past visits behind.
7. How unmatched payments are shown
What to check: no tool can link every payment to a visit, so ask where the rest goes. A tool can leave those payments out, spread them over the known channels or fold them into Direct. Each choice makes the report look cleaner than it is. You want a separate row, the reason for each gap, and a total that agrees with your payment provider.
Example only, with made-up numbers for an imaginary product in one month. The provider took $10,000, and $2,000 of it has no known visit:
| Channel | Shown separately | Left out | Spread over channels |
|---|---|---|---|
| Organic search | $4,000 | $4,000 | $5,000 |
| $2,400 | $2,400 | $3,000 | |
| Paid | $1,600 | $1,600 | $2,000 |
| Unattributed | $2,000 | Hidden | Hidden |
| Total | $10,000 | $8,000 | $10,000 |
Leaving the payments out gives a total that no longer matches the provider. Spreading them gives Paid $400 that nobody measured, and that is the number you would compare with ad cost.
Virling: a payment with no visitor ID and no email match, or with no visit inside the lookback window, is Unattributed. It counts toward revenue, has its own row and is never shared out. A Matched revenue line gives the share that was linked and the reasons for the rest, and the Payments page filters by unattributed. Expect a large share at the start, because payments from before the script was installed usually have no visits. The causes and fixes are in unattributed revenue.
The checklist in one table
Use it on any tool you are considering, open source or not. For hosted options too, see the best marketing attribution tools compared.
| Check | Ask any tool | Virling |
|---|---|---|
| Licence | Which licence, and which features does it cover? | AGPL-3.0, every feature |
| Same code | Is the download what the company runs? | Yes, the same open-source code |
| Payment keys | What access, and stored where? | Read-only where the provider allows, encrypted in the data folder |
| Services | What must I run and update? | One program, no separate database |
| Backups | What do I copy, and can I test it? | One folder, with the server stopped |
| Export | Can I take raw visits and payments? | No export yet; open the database files when self-hosting |
| Unmatched payments | Where do they go? | Their own Unattributed row, counted in revenue |
Read the rule that gives credit
The main gain from open code is that you can check how a channel earned its number. Find the rule that picks the visit, then test it: visit your site from a tagged link, come back by typing the address, make a test payment, and see which visit gets the credit. In Virling, each payment carrying a visitor ID is matched to that visitor's sessions in the lookback window, and one session gets the whole amount. The steps are in how Virling works, and the code is on GitHub.
What Virling does not do
- It uses one model at a time per site: last non-direct, first touch or last touch. Linear and position-based are not available yet
- It has no custom channel rules, and reports only in USD
- It does not link payments to visits in cookieless mode, because there is no visitor ID to pass to checkout
- It does not see a person who browses on one device and pays on another, unless an email matches. Email matching works for Stripe, Shopify and WooCommerce
- It backfills 90 days of payments, 60 for Shopify, and only one-time purchases for RevenueCat
- It is in early development, so a release can break things. Read the changelog before you upgrade
How to try it
To run it yourself, follow the quickstart: start the server, add your site, sign in, add the script, connect payments and link checkout to visits. The self-host page shows what you get. If you would rather not run a server, start the hosted version with a 14-day free trial: add a card, cancel before day 15 and nothing is charged.
Frequently asked questions
What is open-source marketing attribution?
Software with public source code that links each payment to the website visits before it, so you see which channel brought paying customers. You can read how credit is given, and run it on your own server.
Is open-source marketing attribution free?
The software often is, but check the licence and whether any feature is kept for paying users. Virling is AGPL-3.0 and free to self-host with every feature; you pay for the server and spend time on upgrades and backups. Hosted plans start at $19 a month after a 14-day free trial.
Which attribution models does Virling support?
Last non-direct (the default), first touch and last touch, one model at a time per site, with a lookback window of 30, 60, 90 or 365 days. Linear and position-based models are not available yet.
Do I have to give an attribution tool my payment key?
To read payments on its own, yes. Give it a key that can only read. Virling refuses Stripe secret keys and takes a restricted one, and encrypts every key before it is stored. LemonSqueezy keys cannot be limited, and Creem and RevenueCat keys also need permission to add a webhook.
Can I move from hosted Virling to my own server?
Yes, but past visits stay behind, because a hosted account cannot be exported. You add your sites to your server, point the script at it and connect your payment providers again. Payments from before the move are usually Unattributed.
Why does an attribution tool show unmatched payments?
Because no tool can match every payment. A visit can be blocked, or a checkout can carry no visitor ID. A tool that shows those payments keeps its total honest. Virling counts them as revenue and labels them Unattributed.
Attribution you can read, run and check
Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.