WooCommerce, Kajabi, and the rest
The tracking snippet already stores the visitor id in a first-party cookie. These checkouts send that id with the sale.
shonylabs_visitor_id cookie. The amount is trusted because the call uses your API key.WooCommerce
Install the plugin in plugins/woocommerce from this project. In WordPress, open Settings → ShonyLabs, paste an API key from Settings → API, and leave the host as https://api.shonylabs.com unless you proxy the tracker. On checkout the plugin copies the cookie onto the order. When WooCommerce marks the payment complete it reports the sale, and a refund reports the refund.
Kajabi
Kajabi does not run your PHP. Add the tracking snippet to the site header, then in Kajabi create an automation on Offer purchased that sends a webhook to your own endpoint. That endpoint reads nothing from Kajabi about the browser, so pass the visitor id yourself: on the checkout page, copy shonylabs_visitor_id into a hidden field or the checkout's custom field, and include it as shonylabs_visitor_id on the transactions call. Use Kajabi's offer purchase id as transaction_id so a repeated webhook does not count twice.
Podia
Paste the snippet into Podia's custom header code. Podia's purchase webhook does not include the cookie, so the reliable path is a thank-you page you control, or Zapier between Podia and a small endpoint you run. On that page, read the cookie and call the transactions API once per order id. Store the order id in sessionStorage so a refresh does not send it again.
Ghost
Add the snippet in Ghost's code injection header. Member checkout usually returns through Stripe, so use the Payment Links section. Ghost's webhook has the member email, not the browser cookie, and the transactions API wants shonylabs_visitor_id. Send that cookie from a page on your domain after they come back.
Stripe Payment Links
A Payment Link is hosted by Stripe, so the cookie is not on Stripe's domain. Before sending the visitor there, append the cookie as the link's client_reference_id:
var match = document.cookie.match(/(?:^|; )shonylabs_visitor_id=([^;]+)/);
var id = match ? decodeURIComponent(match[1]) : "";
var link = document.querySelector("a[href*='buy.stripe.com']");
if (link && id) {
var url = new URL(link.href);
url.searchParams.set("client_reference_id", id);
link.href = url.toString();
}On checkout.session.completed, read client_reference_id and call the transactions API with it as shonylabs_visitor_id. If you already connected Stripe under Settings → Revenue, that webhook is handled for you when the reference id is present.