Track revenue from demo bookings: booked call to paid invoice
By Devendra Variya, co-founder of Virling. Published 2026-11-24.
To track revenue from demo bookings, record the booking as a goal on your site, send the buyer's email with their visitor ID at the same moment, and join the invoice to that visitor by email when it is paid. The booking alone tells you who asked for a call. The join tells you which channel brought the calls that became money. It works best when the booking form is on your own pages. A calendar embedded from another site may not give your page the email, and then the join needs a step of its own.
This is for teams that sell on a call: sales-led SaaS, consultancies and other services where the buyer books, talks to you and later pays an invoice. For the wider picture of trials, renewals and several visits, read B2B SaaS attribution for small teams.
Why bookings and revenue come apart
- The booking is not the sale. Some people do not turn up, some are not a fit, and some pay much later. Counting bookings treats them all alike.
- The sale happens off your site. The call, the proposal and the invoice leave no visit behind.
- The invoice carries no visitor ID. An invoice you send from Stripe does not pass through a checkout on your site, so nothing on it says where the buyer came from.
- The booking tool is often a third site. The one moment you learn the email may happen where your script cannot run.
Set it up on a booking form you own
1. Add the script
Put the Virling script in the head of every page, the booking page included. Leave cookieless mode off: without the virling_vid cookie there is no visitor ID to join an invoice to. See add the script.
2. Send a goal and the email when the booking is accepted
Do both in the code that runs after your server says yes, so a failed form is not counted. /api/book-demo and yourproduct.com stand for your own:
const res = await fetch("/api/book-demo", { method: "POST", body: new FormData(form) });
if (res.ok) {
window.virling?.("goal", "demo request");
const vid = window.virling?.vid?.();
if (vid) {
fetch("https://app.virling.com/api/event", {
method: "POST",
body: JSON.stringify({
n: "identify",
u: location.href,
s: "yourproduct.com",
v: vid,
m: form.email.value,
}),
});
}
}The goal puts demo request next to the pageviews in the buyer's journey. Goal names are compared exactly, so pick one lowercase name and keep it, and leave names and emails out of it. If you also want to count confirmed calls apart from requests, use a second name, such as booking. A chat started on the page can be a goal of its own too; see live chat revenue tracking. The rules are in goals. To save the campaign with the booking itself, see UTM parameters in hidden form fields.
The identify event is what the invoice is matched on later. Virling keeps only a salted SHA-256 hash of the trimmed, lowercased email, and matching never crosses sites. If one email identifies from two browsers, the first one keeps it. Mention this in your privacy policy as you would any use of the form's email.
3. Connect Stripe
Connect Stripe with a restricted key that can only read. Virling imports the last 90 days of charges, then checks for new ones every minute. A charge with no visitor ID whose billing or receipt email matches an identified visitor is credited to that visitor and shows Matched by email on the Payments page. The whole path is in the sales-led B2B guide, and product-led setups are on the SaaS integration page.
When the booking is embedded from another site
Many teams paste a scheduling widget into the page. It looks like part of your site, but it is a frame from another domain, and browsers keep the two apart. Your page's script cannot read what is typed in the frame, and the frame cannot read the virling_vid cookie on your domain. The event API also only accepts pages on your domain or a subdomain of it, so an event sent as the scheduling tool's page is dropped. For one tool step by step, see Calendly UTM tracking or Cal.com UTM tracking. What you can still record depends on what the tool offers, so check its documentation:
| Where the booking happens | Goal | Email for the invoice match |
|---|---|---|
| Your own form | When your server accepts it | Yes, in the same code |
| Your own short form, then the calendar | When the form is accepted | Yes, before the calendar is shown |
| Embedded, the tool sends your page an event | When the event says booked | Only if the event includes it |
| Embedded, the tool redirects to your site | On your confirmation page | Only if you ask for it on your site |
| Embedded, neither is offered | Not from the booking itself | No |
| A link to the tool's own page | On the click, which is not yet a booking | No |
- The short form first is the safest. Ask for the work email on your page, send the goal and the identify event, then show the calendar. Some people will stop between the two, so call the goal a request, not a booking.
- Redirects should open in the whole page. If the buyer is sent away to the tool and back, add the tool's domain to Same-visit domains in Site settings. Otherwise the return can start a new visit with the scheduling tool as its source.
- Do not ask for the email in the redirect's address. Addresses end up in browser history, server logs and other scripts on the page.
- A webhook alone is not enough. It tells your server the email, but not which visitor on your site it belongs to.
How the invoice is joined weeks later
- The buyer arrives from a search, reads two pages and books. The visit has a channel, the goal is stored, and the email's hash is tied to the visitor ID.
- The call happens. Virling sees nothing of it.
- Weeks later the invoice is paid in Stripe, with no visitor ID and the same email. Virling reads the charge on the next sync and finds the visitor.
- It looks at that visitor's visits inside the lookback window before the payment and credits one, by the site's model: last non-direct by default, first touch or last touch.
- If it was the first invoice of a subscription, the renewals and upgrades of that Stripe customer keep the same channel.
Two settings matter more here than for self-serve sales. The lookback window must be longer than the deal: work out yours with the sales cycle calculator, then choose 30, 60, 90 or 365 days. And if buyers come back by email before they pay, first touch shows what brought them in the first place. Tag the link in your sales team's email signatures so those return visits count as Email, not Direct. Changing either rebuilds attribution for past payments too. Stripe invoice attribution goes through the matching in detail.
A worked example: bookings against paid revenue
These numbers are made up to show the method. One quarter of demo bookings, with every invoice those deals paid by the time you look:
| Example only | Bookings | Paying customers | Paid revenue | Revenue per booking |
|---|---|---|---|---|
| Paid | 40 | 4 | $6,000 | $150 |
| Organic search | 25 | 6 | $15,000 | $600 |
| 15 | 3 | $5,250 | $350 | |
| Referral | 10 | 5 | $14,000 | $1,400 |
| Unattributed | counted above | 2 | $4,000 | unknown |
| All | 90 | 20 | $44,250 | about $492 |
By bookings, Paid is the best channel, with 40 of 90. By money it is third of the four: one booking in ten paid, and a booking was worth $150. Referral brought the fewest bookings, and half of them paid, for $1,400 a booking. Anyone who cut Referral for its small count would have cut the second largest revenue line. The two unattributed customers booked too, so their bookings are in the rows above, but they paid with an email that matches none of them. Their revenue stays on its own line instead of being spread over the channels.
Ten or twenty deals are few, and one large invoice can move a row. Read the table as a question to look into, not as a ranking, and wait until most deals of the period have had time to close. To compare channels by deal size, win rate and time to close together, use the sales velocity calculator.
Read it in Virling
- Pick a range that starts before the bookings and is long enough for invoices to be paid. The Time to pay card shows the median time from first visit to first payment per channel.
- On the Channels card, read revenue per channel. Click a channel to filter the page, then open the Goals tab of the Goals card for the number of
demo requestgoals from its visits. - On the Visitors page, filter by the goal to see who booked, and use Filters to pick those who paid or did not.
- Open a payment on the Payments page to see the journey, with the goal in it and the credited visit marked.
One thing to know when you put the two side by side: a goal belongs to the visit it happened in, while revenue follows the attribution model. A buyer who first came from a referral and booked on a later visit from an email counts as an Email booking, and first touch credits the invoice to Referral.
What stays out of reach
- A different payer. Matching is exact. If an accounts team pays with its own address, the invoice does not match the person who booked.
- Money outside Stripe. Virling imports charges from the payment provider you connect. A bank transfer that never goes through it is not in the numbers. Email matching for invoices is on Stripe.
- Payments synced before the identify. Send the email at the booking, not after the deal is signed.
- Bookings from a phone call or an introduction. With no visit there is nothing to credit. Asking helps; see self-reported attribution.
- Blocked scripts and other devices. A visit that was not recorded, or was made in another browser, is not joined.
To check the setup, open your site from a tagged link in a private window, book with an email you can pay with, and pay a Stripe test invoice to that address. The steps are in test your setup.
Frequently asked questions
How do I track revenue from demo bookings?
Send a goal when the booking is accepted, and send the buyer's email with the visitor ID in an identify event at the same moment. When the invoice is paid in Stripe with the same email, Virling credits the payment to that visitor's visits, so you can compare bookings with paid revenue per channel.
Can I track bookings made in an embedded calendar?
Sometimes. A calendar embedded from another domain is closed to the script on your page, so it depends on what the tool offers: a redirect to a confirmation page on your site, or an event it sends to your page. If it offers neither, ask for the email in a form of your own before you show the calendar.
Does Virling read my calendar or CRM?
No. Virling reads visits and goals from your site and payments from your payment provider. Whether a call took place, and what was said on it, is not visible to it.
Why is an invoice unattributed when the buyer booked a demo?
The usual causes are an email that differs between the booking and the invoice, an identify event that was never sent or came after the payment was synced, or visits older than the lookback window. The payment still counts toward revenue, as Unattributed.
Which lookback window fits demo bookings?
One longer than most of your deals take from the first visit to the paid invoice, including the wait between a signed deal and the payment. Virling offers 30, 60, 90 or 365 days, with 90 as the default.
See which demo bookings turn into paid invoices
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.