The platform API and the SDK
nahnu-analytics-sdk connects a SaaS, website builder or app platform to Nahnu Analytics from your own code. It runs on Node, Next.js, edge runtimes and React Native, and talks to the platform API of your WordPress site with the plugin.
It does five jobs:
- Sets everything up from your system. Each of your users becomes a client and each website they add becomes a site, both by your own ids. Calling again updates; it never makes a second one.
- Tracks traffic under your brand on every custom domain your Next.js app serves: the script and its visits come from the site’s own domain.
- Records sales and signups from your servers and webhooks, including Stripe and Shopify. They join the buyer’s visit, so the source that brought them gets the credit.
- Records screens and events from mobile apps: React Native, Expo, or anything that can send HTTP.
- Signs your users in to their client portal with a one-time link, and lets you read the stats in your own app.
Every report and goal works for this data, as for any other site.
| Entry point | Use it in | For |
|---|---|---|
nahnu-analytics-sdk | Your server | Clients, sites, users, events, stats, Stripe and Shopify |
nahnu-analytics-sdk/next | Next.js pages | <Analytics>, track(), identify(), view() |
nahnu-analytics-sdk/next/server | Next.js routes | createProxy(), trackAfter() |
nahnu-analytics-sdk/app | Mobile and desktop apps | createAppClient() |
nahnu-analytics-sdk/read | Browser or server | createReader(): fast reads with a token |
Version 1.4.0, for the Nahnu Analytics plugin 1.0.0. openapi.json in the package describes every route (OpenAPI 3.1).
Next: Install and authenticate.
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!



