Polar revenue attribution

Tie paid Polar customers back to the campaign that brought them in.

Two steps: connect your Polar API key in Piqo, then pass the piqo_visitor cookie as Polar checkout metadata. A background sync pulls paid orders every minute and records each one against the visitor's pageviews.

1. Connect Polar in Piqo

In your site's Settings → Polar, paste an Organization Access Token (create one in Polar under Settings → Developers, with the orders:read scope).

2. Pass the visitor id into checkout

On your server, attach the visitor id to the checkout's metadata:

// Node — wherever you create the Polar checkout
const checkout = await polar.checkouts.create({
  products: ['<your_product_id>'],
  successUrl: 'https://yoursite.com/thanks',
  metadata: {
    piqo_visitor_id: req.cookies.piqo_visitor,   // your own visitor id
    piqo_session_id: req.cookies.piqo_session,   // optional
  },
});

What you'll see

Within a minute, the order shows up on your dashboard's Conversions page with the same channel / country / UTM columns the matching pageview carried, and its revenue lands on the chart. Orders without the metadata still count toward revenue totals — they just show as Direct.

Where does the visitor id come from? Keep your own — generate a UUID on first pageview, store it in a first-party cookie, and pass that string. Any opaque, stable token works.