mirror of
https://github.com/hanzoai/insights-node.git
synced 2026-10-30 20:01:53 +00:00
main
github.com has no runner for hanzo-build-linux-amd64, so a caller under .github/workflows is a gate that can never be scheduled. This is the ~7-line caller on the plane that can (git.hanzo.ai git-runner fleet), pinned @v1. Co-authored-by: Hanzo Dev <[email protected]>
Hanzo Insights Node.js SDK
Note: The Node.js SDK code has moved to hanzoai/insights-js — use
@hanzo/insights-nodeinstead.
Fork of PostHog/posthog-node (now deprecated upstream — code lives in posthog-js monorepo).
Install
npm install @hanzo/insights-node
Usage
import { Insights } from '@hanzo/insights-node'
const insights = new Insights('YOUR_API_KEY', {
host: 'https://insights.hanzo.ai'
})
insights.capture({
distinctId: 'user_123',
event: 'signed_up',
properties: { plan: 'pro' }
})
await insights.shutdown()
Upstream
This is a branded fork. Active development is in hanzoai/insights-js/packages/node.
To sync upstream:
git remote add upstream https://github.com/PostHog/posthog-node.git
git fetch upstream
git merge upstream/main
Languages
JavaScript
100%