virling Pricing Self-host Demo Changelog Agencies GitHub Start free trial
integrations / stripe for coaching and consulting

Stripe revenue tracking for coaches and consultants

To see which channel brings paying clients, each Stripe payment has to point back to a visit. Virling does that for Payment Links on your site with no code, and for Checkout when you pass the visitor ID. An invoice you email carries no ID: it is credited when the payer's email matches one the client gave you on your site, or when that Stripe customer's first payment was attributed. The rest stays Unattributed. Open source under AGPL, hosted or self-hosted.

Start free trial See the demo

Stripe knows who paid for a call, a package or a retainer, but not the podcast, post or newsletter that brought them. This page covers how each way of charging on Stripe joins to a visit. For the wider setup, including booking goals and tagging guest spots, see revenue attribution for coaches and consultants.

Which payments link to a visit

How the client paysCredited to a visitStays Unattributed
Payment LinkClicked as a normal link to buy.stripe.com on a page with the script.Opened from an email, a DM, a QR code or another site, or on a custom domain.
CheckoutYour server sets client_reference_id or metadata.virling_vid to the visitor ID.Neither field is set.
InvoiceThe payer's email matches an earlier identify, or the same customer's first payment was attributed.No email match and no attributed first payment.
RetainerA subscription whose first payment was attributed: every renewal keeps its channel.The first payment was Unattributed or is older than the first import, and no email matches.
Paid outside StripeNever.Not imported: an invoice marked as paid outside Stripe has no charge.

Unattributed payments still count toward revenue, and an email match can also recover a Payment Link or Checkout payment with no visitor ID. By default a credited payment goes to the latest visit in the last 90 days that was not Direct, so if clients follow you for months before they hire you, choose a 365-day lookback window in site settings.

Set it up

  1. Add the site. Click + Add a site and enter your domain, such as yourpractice.com, and its timezone.
  2. Install the script. Paste the tag before </head> on every page, including the pages with your offers and your inquiry form. Leave cookieless mode off.
  3. 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.
  4. Put Payment Links on your site. Send clients to a page that holds the link instead of the bare link. Stripe Payment Link UTM tracking has a test to run. For Checkout Sessions your server creates, pass the ID:
await stripe.checkout.sessions.create({
  mode: "payment", // "subscription" for a retainer
  client_reference_id: req.cookies.virling_vid,
  // ...
});

Invoices: match by email

For work you invoice after a call, capture the email while the client is still on your site. When your own inquiry form succeeds, send it once as an identify event:

fetch("https://app.virling.com/api/event", {
  method: "POST",
  body: JSON.stringify({ n: "identify", u: location.href, s: "yourpractice.com", v: window.virling?.vid?.(), m: email }),
});

Virling keeps only a salted SHA-256 hash of the email. A Stripe payment with no visitor ID whose billing or receipt email matches is credited to that visitor and shows Matched by email on the Payments page. Matching is exact and applies to payments synced after the event, so a client who fills in the form with one address and pays from another, or whose accounts team pays, does not match. Stripe invoice attribution goes through each case.

Deposits, balances and installments

  • Same customer, same channel. Any later charge with the same Stripe customer ID counts as a renewal and copies the channel, referrer, campaign, landing page, country and device of that customer's first payment. That covers a balance invoice after a deposit, separate installments and a repeat package.
  • Make sure there is a customer. A one-time Payment Link or Checkout Session only creates a Stripe customer when one is required. Set customer_creation to always, or pass customer to the Checkout Session, and bill the balance to that customer. Without a customer ID each payment stands alone and needs its own visitor ID or email match.
  • Installments as a subscription. The first charge finds its visitor through its Checkout Session. Later ones have billing reason subscription_cycle and keep the first payment's channel.
  • Retainers you start in Stripe. A subscription created without Checkout has no session to read, so its first invoice needs an email match or an attributed first payment by that customer. Later charges follow it.

An example with made-up numbers: a client arrives from a podcast link, pays a $400 deposit through a Payment Link on your site, and pays a $1,600 balance invoice three weeks later. If both charges have the same Stripe customer, the podcast visit is credited with $2,000. If they do not, it keeps $400, and the $1,600 is credited only on an email match.

What you get

  • Revenue by channel, source and campaign. The Channels card shows visitors, revenue and revenue per visitor for each row.
  • Every payment and its journey. The payments list shows the channel each one was credited to. Open one to see the visits before it.
  • Refunds and disputes. Refunds and lost disputes lower payments that were already imported.

What to know

  • Payments older than the 90-day backfill are not imported, so renewals of retainers that started before that are usually Unattributed.
  • Payments in the first import were usually made before the script was on your site, so they count as revenue but are Unattributed.
  • Someone who hears you on a phone and pays on a laptop is two visitors, unless an email match joins the payment to the first.
  • Virling does not read your calendar, scheduling tool or CRM. An email a client types into a booking tool on another domain does not reach it.

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.

Frequently asked questions

How do I see which channel brings my clients on Stripe?

Add the Virling script to your site, connect Stripe with a read-only restricted key, and let clients pay through a Payment Link on your page or a Checkout Session that carries the visitor ID. Each payment is credited to a visit before it, and the Channels card shows revenue by channel, source and campaign.

Why does a client's Stripe invoice show as Unattributed?

An invoice you send from Stripe never passes through a checkout on your site, so it carries no visitor ID. It is credited when the payer email matches an email the client shared earlier in an identify event, for example on your inquiry form. A later invoice also keeps the channel of the same Stripe customer's first payment. Otherwise it is Unattributed.

Are a deposit and its balance credited to the same channel?

Yes, when both payments have the same Stripe customer ID and the deposit was attributed. Any later charge of a customer keeps the channel of that customer's first payment. A one-time Payment Link often creates no customer, so set customer_creation to always on the link and bill the balance to that customer.

Are installments and monthly retainers attributed?

Yes. When they are a Stripe subscription, each charge with billing reason subscription_cycle keeps the channel of the client's first payment. Separate charges and invoices keep it too, as long as they are billed to the same Stripe customer. If the first payment is Unattributed, the later ones usually are as well.

Does a Payment Link sent by email or DM link to a visit?

No. A link opened from an email, a DM or a QR code never passes through a page with the script, so it carries no visitor ID. Send clients to a page on your site that holds the link, and the script adds the ID when they click.

Does Virling need write access to Stripe?

No. It asks for a restricted key with Read on Charges, Checkout Sessions, Customers, Events, Invoices, Subscriptions and PaymentIntents, and refuses secret keys.

Full guides: Stripe in the docs, Sales-led setup with invoices and Unattributed revenue.

Start free trial