Skip to content

Revenue

Polar revenue by traffic source

Polar (polar.sh) takes the payment. traffic.cx tells you which visit, source and campaign it came from, for one-off orders, subscription starts and renewals. Connect a Polar organization access token, pass one ID from the visit as checkout metadata, and paid orders and refunds show up next to the traffic that earned them. Orders that can't be linked stay in your totals as "Unattributed".

Last updated

Last updated 28 October 2026. Setup details come from the Polar setup guide and revenue docs. Need the step-by-step technical guide? Go to /integrations/polar.

In short

  • Connect: create a Polar organization access token with five read/webhook scopes and paste it in traffic.cx Settings → Revenue. traffic.cx creates the webhook and imports the last 90 days. Sandbox tokens work too.
  • Link: pass the visitor's pageview ID (tcx_pvid) in the checkout's metadata when your server creates the checkout session.
  • Read: revenue, paying customers, conversion rate and revenue per visitor by channel, source, campaign, landing page, country and device.
  • Cost: included on every plan, Free too: one site, 3,000 events a month, no card.

What Polar orders look like in traffic.cx

traffic.cx reads paid orders (one-off purchases, subscription starts and renewals) and refunds. On the Revenue page you compare sources by:

MetricDefinition
RevenuePayments minus refunds, in the site's currency, by payment time
Paying customersDistinct customers who paid in the period
Conversion rateFirst-time buyers ÷ unique visitors
Revenue per visitorRevenue ÷ unique visitors
Average order valueRevenue ÷ payments that aren't refunds
LTVAll the revenue so far of the customers first won in the period, per customer

Amounts are the order's net amount. Polar describes itself as a merchant of record (Polar docs, as of Oct 28, 2026), and traffic.cx leaves out the tax Polar collects (definitions).

How a Polar order finds its visit

  1. The visit. The traffic.cx tracker records the visit with its source, campaign and landing page.
  2. The checkout. When the visitor starts checkout, your page reads trafficcx.pageviewId() (and, in cookie mode, trafficcx.visitorId()) and your server adds them to the checkout session's metadata. Polar's API reference says metadata set on the checkout "will be copied to the resulting order and/or subscription" (Polar API reference, as of Oct 28, 2026), which is how the IDs reach the paid order.
  3. The order. When the order.paid webhook arrives, traffic.cx credits the visit using last non-direct (default) or first touch, within a 90-day lookback by default (7 to 365 days). The order's billing reason tells it whether this is a one-off payment, a subscription start or a renewal.
  4. Renewals inherit the customer's first payment's attribution.
  5. Refunds count once they succeed, credited to the order they refund; failed or canceled refunds are removed.
  6. No link: the order stays in the totals as Unattributed.

In the default cookieless mode, the pageview ID links an order to the visit where checkout started; visitor IDs rotate daily and don't connect visits across days. Longer journeys need the optional cookie mode (same browser only) or an earlier payment from the same customer (cookieless vs cookie mode).

Connect Polar in three steps

Install and verify the tracker first. You need an owner or admin role in traffic.cx and permission to create a Polar organization access token. Use a separate traffic.cx test site for sandbox orders.

  1. Create a reporting token. In Polar, open Settings → Developers and create an organization access token with orders:read, refunds:read, organizations:read, webhooks:read and webhooks:write. In traffic.cx, open Settings → Revenue, choose Connect next to Polar and paste it. traffic.cx tries production first, then the sandbox, creates the webhook endpoint, keeps its signing secret encrypted and imports the last 90 days.
  2. Pass the visitor's IDs. In your server's checkout code, put the validated tcx object in the checkout's metadata. Your checkout token needs checkouts:write; it's separate from the reporting token you give traffic.cx. Use the sandbox host with sandbox products, and the live host with live products. The setup guide has the code.
  3. Test one order. Follow the attribution test flow in Polar's sandbox. Confirm the completed order has tcx_pvid in its metadata and appears with the expected source. For subscriptions, check the start and a renewal, and a successful refund.

The Polar details traffic.cx handles

WebhookRecorded as
order.paidA one-off payment, a subscription start, or a renewal (from the order's billing reason)
refund.created, refund.updatedA refund once it has succeeded; failed or canceled refunds are removed
  • Two tokens, two jobs. The read-focused reporting token goes to traffic.cx; the checkout token with checkouts:write stays on your server.
  • Sandbox or production is detected from the token.
  • Only paid orders count: a created checkout without an order.paid delivery isn't revenue.

When an order shows as Unattributed

  • The IDs were sent in customer_metadata instead of checkout metadata.
  • The tracker was blocked or hadn't loaded when checkout started.
  • The visit falls outside the lookback window, or the buyer returned on a later day or another device in cookieless mode.
  • It's an imported order from before you connected.

Pricing

Sign up with Google or email and start on the Free plan: every feature on one site, no card and no trial clock. Revenue attribution is included on every plan, Free too. A payment received through a provider integration is not a pageview or custom event. See pricing.

See which traffic pays you

Start free · Polar setup guide · How revenue attribution works · Pricing

Using another provider? See Stripe, Lemon Squeezy or Dodo Payments.

Frequently asked questions

How do I see which traffic source my Polar sales come from?

Install the traffic.cx script, connect Polar with an organization access token in Settings → Revenue, and pass the visitor's pageview ID in the checkout's metadata. traffic.cx then credits each paid order to the visit's source, campaign and landing page.

Which token scopes does traffic.cx need?

orders:read, refunds:read, organizations:read, webhooks:read and webhooks:write. Your own checkout token additionally needs checkouts:write, and stays on your server.

Does it work with Polar's sandbox?

Yes. Sandbox tokens work: traffic.cx tries production first, then the sandbox. Use a separate traffic.cx test site so sandbox orders stay out of your real reports.

Do subscription renewals keep their original source?

Yes. A renewal for a known customer inherits the attribution of that customer's first payment.

Is tax included in revenue?

No. Amounts are the order's net amount, because Polar collects the tax as the merchant of record.

Do I need cookies for this?

No. In the default cookieless mode, the pageview ID links an order to the visit where checkout started. The optional cookie mode links visits across days in the same browser. Whether you need consent depends on your setup and the rules that apply to you.