Attribute Polar revenue to signups
Use the checkout link success URL, or put the visitor id in checkout metadata.
Before you start
Your Polar organization must be connected to Chartsy (Polar connection guide) and set as the site's Revenue account under Settings → domains, with the Chartsy tag on your site.
Polar buyers are matched to signups by email automatically. Pick the method below that fits how you sell to also credit buyers who pay with a different email - or never sign up. Both match by visitor id, so they keep working with GDPR mode on.
1Selling through checkout links: set the success URL
In Polar, open Products → Checkout Links, and set each link's Success URL to a page on your site that has the Chartsy tag, ending in ?checkout_id={CHECKOUT_ID}:
https://yoursite.com/thank-you?checkout_id={CHECKOUT_ID}Polar fills in the id. When the buyer lands, Chartsy looks up the order with your connected Polar account and credits it to the visit that brought them. No code needed - see success-page matching for the details.
2Creating checkouts from your server: add checkout metadata
Polar copies checkout metadata onto the order it creates, so put the visitor's chartsy_visitor_id cookie there:
const checkout = await polar.checkouts.create({
products: ['<your product id>'],
// ...your existing options
metadata: { chartsy_visitor_id: req.cookies.chartsy_visitor_id || '' },
});Email matching and GDPR mode
- Without either method, Polar buyers are still matched by email to people who signed up. Calling
window.chartsy.identify({ email })on your post-purchase page works too. - With GDPR mode on for the Polar source, no emails are stored, so email matching stops - the two methods above keep working.


