Feature · Payment providers

Lemon Squeezy Analytics: See Which Channels Bring Sales

Lemon Squeezy shows your sales, but not where buyers came from. Connect it to DataFair to see revenue by source, page and campaign in a few minutes.

· 3 min read

Traffic lines flowing into a revenue target beside a checkout card

Lemon Squeezy handles payments, tax and invoices for you as the merchant of record. Its dashboard tells you what sold. What it can't tell you is which blog post, newsletter, search query or social post brought each buyer. That part happens on your website before checkout.

What Lemon Squeezy's dashboard covers

  • Revenue, orders and refunds over time
  • Subscriptions, MRR and churn for subscription products
  • Customers and their orders
  • Affiliate sales, if you run an affiliate program

Affiliate links are the one place it knows the source. Everything else (search, social, email, AI assistants) shows up as a sale with no channel.

Connect the visit to the order

Lemon Squeezy checkouts accept custom data, passed as checkout[custom][...] on the checkout URL, and send it back in the order webhook. That's the bridge between your analytics and your sales:

  1. 1Visitor arrivesDataFair records the source and a visitor id
  2. 2Visitor opens checkoutThe script adds the visitor id to the checkout link through checkout[custom]
  3. 3Order is paidLemon Squeezy sends order_created to DataFair
  4. 4Revenue appears by sourceNext to visitors, pages and campaigns
Lemon Squeezy attribution with DataFair

With DataFair's script on your site, Lemon Squeezy checkout links are tagged automatically. You don't write any code.

Set it up

  1. Add the DataFair script to your site.
  2. In DataFair, open Integrations, pick Lemon Squeezy and click Get webhook URL. DataFair also makes a random signing secret.
  3. In Lemon Squeezy, add a webhook with that URL, paste the same secret, and tick order_created, order_refunded, subscription_payment_success, subscription_payment_failed, subscription_payment_refunded and subscription_cancelled.
  4. Back in DataFair, click Save and finish.

Test mode and live mode keep separate webhook lists, so add it in the mode you sell in.

What you get

Revenue by channel in DataFair's demo
Channels in the DataFair demo (sample data). The green part of each bar is revenue.

Related guide: Lemon Squeezy revenue attribution.

Questions

Does Lemon Squeezy have built-in traffic source analytics?
It tracks affiliate referrals. For other sources, such as search, social, email and AI assistants, you need web analytics joined to your orders.
Do I need to change my checkout links?
No. The DataFair script adds the visitor id to Lemon Squeezy checkout links on your pages when they load.
Are past orders attributed?
No. Attribution starts when you connect, because it needs the visit that led to each order.

Related