Polar.sh + SuprAnalytics
See which channels bring your Polar.sh revenue
Polar handles the payment. SuprAnalytics shows where it came from: connect the two and every traffic source, campaign and page shows the Polar revenue it brought, with each customer's journey from first visit to payment.
14-day free trial · No card required · From $9/monthExplore the live demo


Your payment tells you what sold. Attribution shows how they found you.
Polar records the order: the product, the amount, the customer. What it can't know is the Google search, the Reddit thread or the newsletter that brought that customer to your website three days earlier. SuprAnalytics does, when the checkout carries the visitor's id, and puts the two together.
Traffic alone doesn't tell you which channels pay. Attribution shows where paying customers came from, not that a channel caused the sale on its own, and not every payment can be matched to a visit.
- Google1,200$180
- Direct800$90
- Reddit450$320
- X300$140
Connect Polar to your website analytics
About five minutes, most of it in Polar's settings. No code for checkout links; a few lines of metadata for checkouts created on your server.
- Website visit
- Polar checkout
- Polar payment
- SuprAnalytics revenue report
Install the SuprAnalytics script
One line in the
<head>of your pages, or the guide for your platform. From then on every visit is recorded with its source, campaign and landing page, and each visitor gets an id.Add the webhook in Polar
In Polar, Settings → Webhooks → Add Endpoint, in the Raw format, with the URL SuprAnalytics shows for your website and the events
order.paid,order.updatedandorder.refunded.Paste the secret in SuprAnalytics
Copy the endpoint's secret (
whsec_…) into Settings → Revenue with Polar selected. It's how SuprAnalytics checks that every event really came from Polar. Both Polar secret formats work.Pass the visitor id to the checkout
Polar checkout links need nothing: the script adds the id when a visitor clicks. For checkouts your server creates, pass it as metadata. The two methods are below.
See attributed payments
Each order arrives through the webhook, is tied to the visitor and their visits, and shows up on the dashboard, the live view and the customer's journey within seconds.
The visitor id, in plain English. The script keeps a random id in the visitor's browser (the supr_visitor_id cookie). When that id reaches Polar with the checkout, Polar copies it into the order's metadata, and the webhook brings it back. SuprAnalytics looks the id up, finds the person's visits, and the payment joins their journey. No id, no match: the payment still counts in your revenue, without a source.
Works with your Polar checkout flow
Two ways to get the visitor id into the order. Use either, or both on the same website.
Polar checkout links
No code
A link to buy.polar.sh/polar_cl_… anywhere on your pages. When a visitor clicks it, the script adds ?reference_id=<their visitor id>; Polar copies it into the order's metadata.
- Works on links added later too: the id is set at the click, not at page load
- A link that already has a reference_id is left alone
- Only a reference_id that is a visitor SuprAnalytics has seen is used, so your own reference ids are never mistaken for one
- To stop the script touching links, add
supr-polar="false"to it
Polar Checkout API
A few lines on your server
When your server creates the checkout, read the supr_visitor_id cookie from the request and pass it as metadata. supr_session_id is optional and credits the payment to that exact visit.
import { Polar } from "@polar-sh/sdk";
const polar = new Polar({ accessToken: process.env.POLAR_ACCESS_TOKEN });
app.post("/checkout", async (req, res) => {
const checkout = await polar.checkouts.create({
products: ["<product id>"],
successUrl: "https://yourdomain.com/thanks",
metadata: {
supr_visitor_id: req.cookies.supr_visitor_id,
supr_session_id: req.cookies.supr_session_id,
},
});
res.redirect(303, checkout.url);
});From the guide, which also has Next.js and Python. The metadata of the customer and the subscription is read as well, so renewals keep their attribution.
See which channels generate Polar sales
Is your Reddit traffic converting? Are newsletter readers becoming customers? Which campaign deserves next month's budget? Every breakdown shows the revenue beside the visitors.


By channel and referrer
Search, social, AI assistants, email, referrals and direct visits, and the websites behind them, each with its customers and revenue.
By campaign
UTM tags and ref links read on arrival, so a sponsored post or a newsletter issue gets its own revenue line.
By landing page, page and country
Which pages people arrive on and read before they pay, and where in the world they pay from.
Over time
Revenue on the traffic chart as its own series, new and renewals apart, with the period before to compare.
Conversion rate and revenue per visitor
The two numbers that rank channels fairly, on every row.
Filtered
Click any row and the whole dashboard, revenue included, narrows to it.
Understand the first visit and the converting visit
Most customers don't pay the first time they come. Pick, per website, which visit gets the credit.
- Mon · visit 1
Finds you on Google
Reads the pricing page, leaves
- Thu · visit 2
Types your address in
A direct visit
- Thu · visit 2
Clicks a Polar checkout link
Pays $79
First touch
The $79 is credited to
The visit that first brought this person to your website, however long ago. Answers which channels find new customers.
Last touch
The $79 is credited to
Direct
The visit the payment happened in. A direct return counts as direct; SuprAnalytics doesn't skip it in favour of an earlier source. Answers which visits close. This is the default.
A checkout link carries the visitor id alone, so the last touch is the visitor's most recent visit before the payment. The Checkout API can add supr_session_id to name the exact visit. Someone who browses on one device and pays on another is two visitors until an email or your app's identify call joins them. More on attribution models
Understand more than the first payment
SuprAnalytics listens to Polar's order events, so a subscription's second month and a refund in its third are part of the same customer's story.
- What arrives
- Every order event Polar sends: paid, updated and refunded. Unpaid orders are ignored until they're paid; free orders are skipped.
- What's stored
- The order's net amount (after discounts, before tax: Polar is the merchant of record, so its tax isn't your revenue), the currency, whether it's a renewal, whether and how much was refunded, the customer's id, email and name, and the ids of the order, subscription, checkout and product.
- Renewals
- Orders with the billing reasons subscription_cycle, subscription_update and subscription_meter_cycle are marked as renewals and credited to the customer's original visit, through the subscription's or the customer's metadata.
- Refunds
- A full refund marks the payment refunded. A partial refund lowers it by the pre-tax amount refunded. Each order is stored once, so Polar's retries are safe.
- What you see
- A revenue figure split into new and renewals, revenue on every source, page and country, each customer's journey with their payments, lifetime value per customer and per segment, and a customers list.
Payments in other currencies are converted to your website's reporting currency with daily rates. This is attribution, not accounting: Polar's dashboard stays the record for invoices and payouts.


Understand the customer journey before the sale
A Polar payment is the last line of a story that started with a search, a few pages and maybe a question in the chat. SuprAnalytics keeps the whole story: the traffic, the visitor's journey, the goals they completed, the conversation, and the payment.
- The visits, pages and goals before the payment, on one timeline
- A chat conversation beside the visitor's analytics, so you know who's asking before you reply (live chat)
- The payment on the same journey, with the product and the amount, when it carried the visitor id
Chat and payment meet on one journey when they come from the same tracked visitor, which is the same browser. A payment from elsewhere joins by the email Polar sends, when SuprAnalytics has seen it before.
Start tracking Polar revenue with SuprAnalytics
The Polar integration is part of every plan, for every website. The plans differ only in monthly analytics events, storage and how long data is kept.
- Payments never count as events: only pageviews, goals and outbound clicks do
- Unlimited websites, each with its own Polar webhook, attribution model and reporting currency
- Every plan starts with a 14-day free trial, with no card. One trial per person.
Plans start at
$9 / month
100,000 analytics events a month, unlimited websites, every feature. Bigger allowances up to 5 million.
14-day free trial · No card required
Questions, answered.
How do I track Polar.sh revenue by traffic source?
Does SuprAnalytics integrate with Polar.sh?
Can I track Polar checkout conversions?
Does SuprAnalytics support Polar checkout links?
Can I use the Polar Checkout API?
Can I track Polar subscription renewals and refunds?
How does first-touch and last-touch attribution work?
Does every Polar payment automatically receive a traffic source?
More payment integrations
- StripeStripe payments and renewals, credited to the source that brought each customer.Open
- Dodo PaymentsDodo Payments revenue by traffic source, with renewals and refunds.Open
- Lemon SqueezyLemon Squeezy orders and subscriptions, tied to the visit that sold them.Open
- PaddlePaddle.js checkouts tagged automatically, with revenue by source.Open
Know where your Polar revenue comes from
Connect your Polar payments with website analytics and see which channels bring paying customers.
14-day free trial · No card requiredHow revenue attribution worksEvery feature, on every plan