mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
The <script src="analytics.hanzo.ai/script.js" data-website-id> tag is a shim: it talks to a read LENS instead of the one ingestion front door, so a docs site could only ever produce pageviews — no errors, no product events, and a separate per-site id to keep in sync. Replaced across all 12 sites with @hanzo/event POSTing api.hanzo.ai/v1/event, which Cloud fans server-side into the web (analytics), product (insights) and error (sentry) lenses. `product` is the only per-site knob; Cloud resolves the tenant, so no site carries an id any more. One implementation, not twelve: packages/analytics (@hanzo/docs-analytics) mounts the provider, adds a pageview per client-side route change, and honors Global Privacy Control / Do-Not-Track by disabling the client outright. The main hub's inline Insights snippet goes too — that lens is already fed by the one stream. Co-authored-by: Hanzo Dev <[email protected]>
40 lines
855 B
JSON
40 lines
855 B
JSON
{
|
|
"name": "@hanzo/docs-analytics",
|
|
"version": "0.1.0",
|
|
"description": "The ONE telemetry drop-in for every Hanzo docs site — @hanzo/event to POST /v1/event.",
|
|
"private": true,
|
|
"license": "MIT",
|
|
"author": "Hanzo AI",
|
|
"repository": "github:hanzo-docs/docs",
|
|
"type": "module",
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsdown",
|
|
"clean": "rimraf dist",
|
|
"dev": "tsdown --watch",
|
|
"types:check": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@hanzo/event": "^0.3.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^25.9.1",
|
|
"@types/react": "^19.2.13",
|
|
"next": "16.2.6",
|
|
"tsconfig": "workspace:*",
|
|
"tsdown": "0.22.0"
|
|
},
|
|
"peerDependencies": {
|
|
"next": ">=15",
|
|
"react": "^19.2.0"
|
|
}
|
|
}
|