Lemon Squeezy integration
Lemon Squeezy revenue attribution
DataFair connects your Lemon Squeezy payments to the visits that led to them, so you can see which traffic sources earn money for your digital products and subscriptions, not just which ones send visitors.
What you see once Lemon Squeezy is connected
- Revenue by channel, referrer, campaign, landing page, country, device and browser
- Revenue per visitor and conversion rate next to your traffic, on one chart
- Every visitor journey that ended in a payment, from the first page to the purchase
- Refunds and disputes taken off the source that earned the sale
- Recurring revenue (MRR) by source, for subscriptions
How payments are matched to visitors
The DataFair script gives every visitor an anonymous id. When that visitor pays, the id travels with the payment and DataFair credits the sale to the visit that brought them.
Checkout links on your site are tagged automatically by the script, through checkout[custom].
A payment that arrives without an id still counts in your revenue totals. It just has no traffic source.
Connect Lemon Squeezy in a few minutes
- In DataFair, open Integrations, choose Lemon Squeezy and copy your webhook URL.
- Open Lemon Squeezy and go to Settings, then the Webhooks tab.
- Click the + button to add a webhook.
- Paste your DataFair webhook URL into Callback URL.
- Paste your signing secret into Signing secret. It must match the one saved in DataFair exactly.
- Tick the events listed below and click Save webhook.
- Use the same secret in DataFair and save.
Lemon Squeezy events DataFair listens to
Every webhook is checked against its signature before anything is stored, and the secret is encrypted at rest.
- order_created
- order_refunded
- subscription_payment_success
- subscription_payment_failed
- subscription_payment_refunded
- subscription_cancelled
Good to know
Test mode and live mode keep separate webhook lists. Add it in the mode you are selling in.
Questions
- Do I need to write code to track Lemon Squeezy revenue?
- Usually not. Checkout links on your site are tagged automatically by the script, through checkout[custom].
- What happens to refunds?
- When Lemon Squeezy reports a refund or a dispute, DataFair takes it off the source that earned the original sale, so your revenue by channel stays honest.
- Which plan do I need?
- Every plan includes revenue attribution. Starter includes one revenue provider connection; Growth and Scale include several. Starter is $5.99 a month at launch and falls to $3.99 as the community grows. Growth goes from $14.99 to $9.99, and Scale from $49.99 to $29.99. Every customer moves to the lower price at their next renewal.
- Can I use Lemon Squeezy with another payment provider?
- Yes, on Growth and Scale you can connect several providers to one website, and each payment is attributed the same way.