virling Docs
v0.3.0 virling.com GitHub Start free
virling Docs

Unattributed revenue

An Unattributed payment counts toward revenue but is not credited to any visit. In charts it is listed last.

Why a payment is Unattributed

  • No visitor ID reached checkout. The most common cause. Pass virling_vid into checkout: see Link checkout to visits. Check that your server reads the cookie on the request that creates the checkout.
  • Cookieless mode. Without a cookie there is no visitor ID to pass. The same goes for a visitor who has not accepted under Until consent. See Cookieless mode.
  • No session in the window. The visitor ID is known, but their sessions all started before the lookback window, or after the payment.
  • The visit was never tracked. The script was missing on that page, blocked by an ad blocker, the visitor had Global Privacy Control with data-respect-gpc, or the visit was filtered as a bot.
  • The link was opened elsewhere. A Stripe, Polar, Dodo or LemonSqueezy payment link opened from an email, a QR code or another site carries no visitor ID.
  • LemonSqueezy without its webhook. LemonSqueezy payments are linked through a webhook that Virling adds when you connect. It needs VIRLING_BASE_URL to be a public https:// address, and the checkout must carry the visitor ID. See LemonSqueezy.
  • A renewal of an unattributed first payment. See Renewals.
  • Imported history. Payments in the backfill, 90 days or 60 for Shopify, were usually made before the script was on your site.

Causes by provider

ProviderWhere the visitor ID is readUsual reason it is missing
Stripemetadata.virling_vid on the charge, its PaymentIntent or the Checkout Session, or the session’s client_reference_idYour server sets neither field, or a Payment Link was opened from an email, a QR code or another site
Paddlecustom_data.virling_vid on the transactionCheckout is opened without customData, or your server creates the transaction without custom_data
Shopifyvirling_vid in the order’s note attributesThe theme snippet is missing, or the cart was made outside your storefront, such as a cart permalink or Buy Button
WooCommercevirling_vid in the order’s meta dataThe functions.php snippet is missing
Polarvirling_vid in the order’s metadata, its custom field data or the customer’s metadata, then reference_id in the order’s metadataThe checkout session has no metadata, or a checkout link is not a normal link on a page that runs the script
LemonSqueezyvirling_vid in the checkout custom data, sent by webhookVIRLING_BASE_URL was not a public https:// address when you connected, or a checkout your server creates has no checkout_data.custom
Dodo Paymentsmetadata.virling_vid on the paymentThe checkout session has no metadata, or a payment link is built in code without metadata_virling_vid
Creemvirling_vid in the checkout’s, subscription’s or customer’s metadata, sent by webhookThe checkout has no metadata, or Virling was not reachable over https, so the webhook is missing
RevenueCatThe customer attribute virling_vidThe attribute was not set before the purchase, or the buyer never came through your site

Recover payments by email

When checkout cannot carry the visitor ID, send the visitor’s email once you know it, for example right after signup, as an identify event:

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

Virling keeps only a SHA-256 hash of the trimmed, lowercased email with a salt of this site. A Stripe, Shopify or WooCommerce payment with no visitor ID whose payer email matches is credited to that visitor. The email is the billing or receipt email on Stripe, the order’s email on Shopify and the billing email on WooCommerce. Matching is exact and never crosses sites. On the Payments page such a payment shows Matched by email. It applies to payments synced after the identify.

Why is my revenue unattributed?

  1. Open an Unattributed payment from /app/yourdomain.com/payments.
  2. Look for Visitor under Details. It is the visitor ID, from checkout or from an email match.
  3. No visitor ID: checkout did not carry one. Find your provider in Causes by provider, fix that cause and make a test payment. If checkout cannot carry the ID, match by email on Stripe, Shopify or WooCommerce.
  4. A visitor ID, but still Unattributed: no visit of that visitor was recorded inside the window before the payment. Choose a longer lookback window if your buyers take longer, and check that the script runs on every page where visitors arrive and is not in cookieless mode.
  5. A renewal: check the customer’s first payment instead. If it is Unattributed, or older than the backfill, its renewals usually are too. See Renewals.
  6. Every LemonSqueezy or Creem payment: on your own server, the webhook may be missing. Set VIRLING_BASE_URL to a public https:// address, restart Virling, then connect the key again so the webhook is added.

Payments made before a fix usually stay Unattributed, since their checkout carried no visitor ID. New ones are credited.

Connect your payment provider and see revenue by channel.

Start free
Was this page helpful?No Edit this page on GitHub