Web Analytics

Vercel-style pageview analytics that you self-host. Events POST to your app's collect route and persist as JSONL on your server. Nexoxa Bridge reads them over SSH — no Nexoxa cloud analytics pipeline.

Installation

bash
npm i @nexoxa/analytics
Requires NexoxaBridge desktop for MCP and Bridge SDK packages. Analytics SDKs only need your app server.

Features

  • ·Next.js, React, Nuxt, and Node collect handlers
  • ·Storage: .nexoxa/analytics/{siteKey}.jsonl on your server
  • ·Custom events, flags, consent gating for EU banners
  • ·View in Bridge → SSH server → Web Analytics

Quick start

typescript
// app/api/nexoxa-analytics/collect/route.ts
import { createAnalyticsCollectHandler } from "@nexoxa/analytics/node";
export const POST = createAnalyticsCollectHandler();

// layout.tsx
import { Analytics } from "@nexoxa/analytics/next";
<Analytics siteKey="nx_your_site" />

Ask a question… Ctrl+I