Directory / plugin
Kehai Analytics
v0.2.0 · by kehai
Cookieless web analytics for WordPress, with WooCommerce revenue confirmed by your server. Requires a Kehai account.
About this plugin
Kehai counts what happened. No sampling, no modeling, no cookies. This plugin connects a WordPress site to your Kehai account and, if you run WooCommerce, sends the revenue your server has confirmed.
Kehai is a hosted, paid service, and new accounts start with a free trial. You need a Kehai account with your site added to it: kehai.io
What the plugin does
- Adds the Kehai tracker. No code to paste and no API key needed.
- Sends WooCommerce revenue from the server. Paid orders and refunds go out after the payment is confirmed, not when a thank-you page loads.
- Shows what was sent. A delivery ledger in WordPress lists every sale and refund, its status, and what to do when one needs review.
The two functions are switched on separately. Tracker-only use needs nothing but your public site ID.
Privacy
- No cookie, and nothing written to browser storage.
- Administrators, previews, and visitors who send DNT or GPC are left out.
- No API key in HTML. The commerce key stays on your server.
- No order IDs, customer details, or payment IDs leave WordPress.
For WooCommerce shops
- A sale counts when WooCommerce confirms the payment, with its actual payment time.
- Refunds follow their purchase: complete, itemized partial, and shipping or tax only.
- Bank transfers, cash on delivery, and refunds recorded by hand are confirmed in one short form.
- A delivery that fails is retried with the same identity, so a sale is never added twice.
- Works with HPOS and legacy order storage, and with the classic and block checkout.
Where the reports are
The plugin collects. Reports, forecasts, goals, and exports are in your Kehai panel.
No Google Ads or Stripe account is connected by this plugin. Google Ads exports in Kehai require a real payment time and a retained GCLID in the explicitly supplied purchase context.
External services
The plugin sends data to the site’s Kehai account at https://stats.kehai.io:
- GET /k.js?site=: the browser loads the Kehai tracker for that site. The tracker sends the page and declared event data described by https://kehai.io/docs/install, and the collector applies the selected site’s settings when the data arrives.
- GET /api/v1/commerce/status: a server-side Bearer-key connection check returns site/module/query-exclusion configuration.
- POST /api/v1/commerce: server-side confirmed order aggregates, optional bounded acquisition context and a random idempotency UUID. The secret, local order/customer IDs and payment transaction IDs are not part of the analytics payload.
- POST /api/v1/commerce/status: at most once per minute, server-side pending/review counts and a fixed error category. No order identifier or raw error text is sent.
Commerce keys stay in a non-autoloaded WordPress option. They are never echoed in HTML, copied into JavaScript, or stored in the outbox. Protect database backups like other WordPress credentials. Outbound commerce requests require HTTPS, certificate validation and no redirects.
Kehai terms: https://kehai.io/terms-of-use
Kehai privacy: https://kehai.io/privacy-policy
Commerce contract: https://kehai.io/docs/ecommerce