Attribute revenue with Lemon Squeezy Payment Links
No-code attribution for Lemon Squeezy: redirect buyers to your site with the order ID.
Make sure you've connected your Lemon Squeezy account first.
Nothing to do. The script adds the visit to every Lemon Squeezy payment link on your pages (as checkout[custom]) as soon as the link appears, and Lemon Squeezy sends it back with the payment. It works even when the buyer pays on another device or never comes back to your site.
Optional backup: the success page
In your Lemon Squeezy dashboard, open a product. For Confirmation modal and Email receipt, set the button link to your website with ?order_id=[order_id]:
text
https://example.com/thanks?order_id=[order_id]When the buyer lands there, the script reports order_id and Datasense ties that payment to the visit, whether the webhook arrived before or after.
Important notes
- Reloads and repeat redirects are fine: it's the same payment, recorded once.
- If you set
checkout[custom]yourself, the script leaves it alone; add the success page or metadata instead.