Files
zeekay d57cb038bd chore: rename all PostHog references to Insights/Hanzo
Bulk rename across 989 files:
- Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc.
- Repository URLs: posthog/posthog-js → hanzoai/insights-js
- Brand names: PostHog → Insights
- File renames: 259 reference JSON files, source files, workflow files
- Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights

Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
2026-03-06 01:41:12 -08:00

21 lines
712 B
JavaScript

// Keep in sync with https://github.com/Insights/insights.com/blob/master/contents/docs/integrate/_snippets/install-nuxt.mdx
import { defineNuxtPlugin, useRuntimeConfig } from '#imports'
import insights from '@hanzo/insights'
export default defineNuxtPlugin(() => {
const runtimeConfig = useRuntimeConfig()
const insightsClient = insights.init(runtimeConfig.public.insightsPublicKey, {
api_host: runtimeConfig.public.insightsHost,
capture_pageview: 'history_change',
loaded: (insights) => {
if (import.meta.env.MODE === 'development') insights.debug()
},
})
return {
provide: {
insights: () => insightsClient,
},
}
})