refactor(posthog): unify project key for all AIRI surfaces and streamline configuration

This commit is contained in:
RainbowBird
2026-07-08 00:05:26 +08:00
parent 2fe0ecc0c2
commit 689f02ac4f
4 changed files with 24 additions and 30 deletions
+5 -2
View File
@@ -1,9 +1,12 @@
import posthog from 'posthog-js'
import { DEFAULT_POSTHOG_CONFIG, POSTHOG_PROJECT_KEY_DOCS } from '../../../posthog.config'
import { DEFAULT_POSTHOG_CONFIG, POSTHOG_PROJECT_KEY } from '../../../posthog.config'
if (!import.meta.env.DEV) {
posthog.init(POSTHOG_PROJECT_KEY_DOCS, {
posthog.init(POSTHOG_PROJECT_KEY, {
...DEFAULT_POSTHOG_CONFIG,
})
// Tag docs-site traffic so it can be told apart from the app surfaces
// inside the shared project.
posthog.register({ surface: 'docs' })
}