ShonyLabs
DocsPricingChangelog
Log inGet started

Getting started

IntroductionQuickstart

Tracking

Tracking snippetCustom goalsIdentify usersExclusions

Privacy

GDPR & cookieless tracking

Revenue

Transactions APIWooCommerce, Kajabi, and the restPayment connectors

Server & bots

Bots & server-side tracking

Reliability

Error tracking

Social listening

Brand mentionsX link attribution

Collaboration

Team & access

Live map

Public live map

Integrations

Google Search Console

No-code platforms

WordPressGoogle Tag ManagerWebflowWixSquarespaceFramerGhostOther platforms

Reference

API referenceCLI & MCP server

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.

Every sale is a call to POST /v1/transactions with the 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.

ShonyLabs Analytics

Privacy-friendly web analytics that shows which channels actually drive revenue.

© 2026 ShonyLabs. All rights reserved.

Product

  • Log in
  • Sign up
  • Pricing
  • Changelog
  • Documentation
  • API reference
  • Crawler directory

Guides

  • Quickstart
  • Tracking snippet
  • Goals
  • Transactions
  • WooCommerce and checkouts
  • Identify visitors
  • Cookieless tracking

Company

  • About
  • Contact
  • Terms of service
  • Privacy policy
  • Data processing agreement