Docs
← Back to site

The platform API and the SDK

2 min readUpdated November 11, 2026

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 pointUse it inFor
nahnu-analytics-sdkYour serverClients, sites, users, events, stats, Stripe and Shopify
nahnu-analytics-sdk/nextNext.js pages<Analytics>, track(), identify(), view()
nahnu-analytics-sdk/next/serverNext.js routescreateProxy(), trackAfter()
nahnu-analytics-sdk/appMobile and desktop appscreateAppClient()
nahnu-analytics-sdk/readBrowser or servercreateReader(): 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?