Lemon Squeezy revenue, attributed across the checkout boundary.
Lemon Squeezy's checkout lives on a different domain (or in an iframe). Cookies don't cross. TrackRev solves it by piping your first-party visitor id into Lemon Squeezy's `custom_data` at checkout open — and reading it back when the order webhook fires.
The visitor id bridges your site and Lemon Squeezy.
Lemon Squeezy's overlay loads in an iframe; the hosted page redirects to a different origin. Either way, the third-party cookie story is fragile. So the TrackRev pixel hands the first-party visitor id to your Lemon Squeezy checkout JS at the moment of the open call — and Lemon Squeezy carries it through to the webhook.
- Visitor id is a first-party cookie on your apex domain (survives ITP, ad-blockers)
- Passed via Lemon Squeezy's checkout custom_data — preserved on order + subscription
- Webhook delivers the visitor id back, joined to the click in seconds
| Newsletter | 4,212 | $8,420 |
| 3,108 | $5,140 | |
| YouTube | 1,927 | $3,860 |
| Direct | 1,512 | $1,910 |
Tax-exclusive subtotal. Your channels reflect real revenue.
Lemon Squeezy is a merchant of record — they handle VAT, US sales tax, the lot. TrackRev reads the order subtotal (tax-exclusive) so a $19 product that the buyer pays $22.61 for after VAT shows up as $19 against the channel that drove it. Your books match Stripe's revenue recognition, not the checkout total.
- Revenue = Lemon Squeezy's subtotal (pre-tax, pre-discount)
- Multi-currency: native currency stored, USD at daily ECB rate for totals
- Refunds via order_refunded reverse revenue + commissions
Every renewal stays bound to its original click.
Lemon Squeezy stamps the subscription with the initial order's custom_data. Every `subscription_payment_success` event carries it forward, so a Newsletter signup that becomes a $39 monthly subscription credits Newsletter on month 1 — and month 12. Cancellations and refunds reverse the credit; resumptions restore it.
- Full webhook coverage: created, updated, payment_success, cancelled, resumed
- Recurring multiplier configurable per program (one-time, N months, lifetime)
- Plan changes update attributed MRR without losing channel history
| Newsletter | 4,212 | $8,420 |
| 3,108 | $5,140 | |
| YouTube | 1,927 | $3,860 |
| Direct | 1,512 | $1,910 |
Lemon Squeezy + TrackRev in 3 steps.
Drop the pixel, pipe the visitor id into checkout, point a webhook at us. Works for overlay and hosted.
Drop the first-party pixel
Sets a first-party cookie on your apex domain. Exposeswindow.trackrev.visitorId()for your checkout JS to read.
<script async
src="https://trackrev.io/p.js"
data-workspace="ws_..."
data-cookie-domain=".yoursite.com"></script>Pass the visitor id into Lemon Squeezy checkout
For overlay checkouts (Lemon.js), setcheckoutData.custombefore opening. For hosted checkouts, append it as a query parameter on the buy URL.
// Overlay checkout (Lemon.js) — drop the visitor id into custom_data.
LemonSqueezy.Url.Open({
productPermalink: "https://yourstore.lemonsqueezy.com/checkout/buy/...",
checkoutData: {
email: user.email,
custom: {
trackrev_visitor_id: window.trackrev?.visitorId() ?? null,
},
},
});// Hosted checkout — append the visitor id as a query param.
const visitorId = window.trackrev?.visitorId();
const url = new URL("https://yourstore.lemonsqueezy.com/checkout/buy/PRODUCT");
if (visitorId) {
url.searchParams.set("checkout[custom][trackrev_visitor_id]", visitorId);
}
window.location.href = url.toString();Point a Lemon Squeezy webhook at TrackRev
Signed with your Lemon Squeezy signing secret, idempotent on event id. Replays and out-of-order deliveries are safe.
# Lemon Squeezy Dashboard → Settings → Webhooks → + button:
https://api.trackrev.io/webhooks/lemon-squeezy/ws_xxxx
# Events:
order_created
order_refunded
subscription_created
subscription_updated
subscription_payment_success
subscription_cancelledThe Lemon Squeezy data we listen for.
Orders
Subtotal (tax-exclusive), native currency, custom_data — joined to a click on every order_created event.
Subscriptions
Full lifecycle: created, updated, payment_success, cancelled, resumed — renewals inherit the original click.
Overlay + hosted
Same flow whether your customer checks out in the Lemon.js overlay or on a hosted Lemon Squeezy URL.
Refunds
order_refunded reverses revenue and pending affiliate commissions on the next sync tick.
Multi-currency
Native currency stored per order, USD via daily ECB rate for cross-currency channel totals.
Merchant of record
Tax-exclusive subtotal is the revenue figure — VAT and sales tax don't inflate your channel math.
Run an affiliate program on Lemon Squeezy. Pay on tax-exclusive revenue.
Pro-tier workspaces flow Lemon Squeezy orders through the same commission ledger as Stripe, Paddle, and Polar. A partner's tagged TrackRev link drops the visitor id into Lemon Squeezy's custom_data; the order webhook closes the loop; commissions accrue on the tax-exclusive subtotal — not on the inflated checkout total.
- Commissions accrue from real Lemon Squeezy orders, not raw clicks
- Subscription renewals carry the original commission forward
- order_refunded reverses pending payouts automatically
- Monthly payouts via Stripe invoice, PayPal Payouts, or manual CSV
| Newsletter | 4,212 | $8,420 |
| 3,108 | $5,140 | |
| YouTube | 1,927 | $3,860 |
| Direct | 1,512 | $1,910 |
Lemon Squeezy integration FAQ
Connect Lemon Squeezy. Find out which channel earned each order.
Works with overlay and hosted checkouts. Free tier covers 1,000 events / month. No card to start.