Goals and revenue
Lemon Squeezy
Lemon Squeezy analytics in Stickybeak listens for the overlay success event, then records the completed order.
Lemon Squeezy conversion tracking
<script src="https://app.lemonsqueezy.com/js/lemon.js" defer></script>
<a class="lemonsqueezy-button" href="https://yourstore.lemonsqueezy.com/checkout/buy/VARIANT_ID">Buy now</a>
<script>
window.addEventListener("load", function () {
window.LemonSqueezy.Setup({
eventHandler: function (event) {
if (event.event !== "Checkout.Success") return;
var order = event.data.attributes;
window.stickybeak("purchase", {
revenue: order.total / 100,
currency: order.currency,
order_id: order.identifier,
});
},
});
});
</script>
| Value | Use |
|---|---|
total / 100 | Total including tax, converted from cents |
subtotal / 100 | Optional before-tax alternative |
identifier | Unique order_id |
Check event.data.attributes once during a live-domain test. Hosted checkout pages cannot call your page; use the lemonsqueezy-button overlay. Renewals and refunds are not recorded.