Files
zeekayandHanzo Dev eec172cbc2 feat(analytics): every docs site on the ONE /v1/event door, not the Umami tag
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]>
2026-07-25 13:34:22 -07:00

34 lines
1.1 KiB
TypeScript

import './global.css';
import type { Viewport } from 'next';
import { baseUrl, createMetadata } from '@/lib/metadata';
import { RootProvider } from '@hanzo/docs-base-ui/provider/next';
import type { ReactNode } from 'react';
import { Analytics } from '@hanzo/docs-analytics';
export const metadata = createMetadata({
title: {
template: '%s | Zen LM',
default: 'Zen LM - Open Foundation Models',
},
description: 'Zen AI model family by Hanzo AI. 14 frontier models from 4B to 1T+ parameters for code, reasoning, vision, and multimodal tasks.',
metadataBase: baseUrl,
});
export const viewport: Viewport = {
themeColor: [
{ media: '(prefers-color-scheme: dark)', color: '#0A0A0A' },
{ media: '(prefers-color-scheme: light)', color: '#fff' },
],
};
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang="en" className="dark" suppressHydrationWarning>
<body className="antialiased">
<RootProvider>{children}</RootProvider>
<Analytics product="zen-docs" />
</body>
</html>
);
}