Revenue
Dodo Payments
Payment links need nothing at all: the script tags them on click. Everything else is a webhook and a return URL.
The webhook
https://geckostats.com/api/webhooks/dodo/<website-id>Add it in Dodo and paste the secret into the Connect payments step of the website. Events are verified with the Standard Webhooks signature.
Payment links and checkouts
A payment link in an anchor (checkout.dodopayments.com/buy/…) is tagged when it is clicked: the script appends metadata_ml_visitor_id and metadata_ml_session_id. If your code redirects to a payment link from JavaScript, append those two parameters yourself from window.geckostats.attribution().
A checkout, payment or subscription created on the server takes the same two keys in its metadata, with return_url a page on your site. Dodo appends ?payment_id=… or ?subscription_id=… to it, which is how a payment is still recovered when the metadata was lost.
When one Dodo account sells products for several websites, list each website's product ids in its settings, and a payment for one of them is placed there even when the webhook reached another.