diff --git a/.env.example b/.env.example
index f881cd6d..fa329d7d 100644
--- a/.env.example
+++ b/.env.example
@@ -1,6 +1,7 @@
INDEXSUPPLY_API_KEY=
SLACK_FEEDBACK_WEBHOOK= # e.g. https://hooks.slack.com/services/...
VITE_BASE_URL= # e.g. https://docs.tempo.xyz
+VITE_GA_MEASUREMENT_ID=
VITE_POSTHOG_HOST=
VITE_POSTHOG_KEY=
VITE_TEMPO_ENV= # testnet|devnet|localnet
diff --git a/biome.json b/biome.json
index e0242fef..14375d27 100644
--- a/biome.json
+++ b/biome.json
@@ -59,6 +59,16 @@
]
},
"overrides": [
+ {
+ "includes": ["vocs.config.tsx"],
+ "linter": {
+ "rules": {
+ "security": {
+ "noDangerouslySetInnerHtml": "off"
+ }
+ }
+ }
+ },
{
"includes": ["env.d.ts"],
"linter": {
diff --git a/vocs.config.ts b/vocs.config.tsx
similarity index 97%
rename from vocs.config.ts
rename to vocs.config.tsx
index 9ebdd607..26678d9e 100644
--- a/vocs.config.ts
+++ b/vocs.config.tsx
@@ -1,6 +1,8 @@
import { Changelog, defineConfig, McpSource } from 'vocs/config'
import { createFeedbackAdapter } from './src/lib/feedback-adapter'
+const gaMeasurementId = process.env.VITE_GA_MEASUREMENT_ID
+
const baseUrl = (() => {
if (URL.canParse(process.env.VITE_BASE_URL)) return process.env.VITE_BASE_URL
// VERCEL_BRANCH_URL is the stable URL for the branch (e.g., next.docs.tempo.xyz)
@@ -13,6 +15,19 @@ const baseUrl = (() => {
})()
export default defineConfig({
+ head: gaMeasurementId ? (
+ <>
+
+
+ >
+ ) : undefined,
changelog: Changelog.github({ prereleases: true, repo: 'tempoxyz/tempo' }),
// TODO: Set back to true once tempoxyz/tempo#tip-1011 dead link is fixed
checkDeadlinks: 'warn',