lobehub/docs/self-hosting/environment-variables/analytics.zh-CN.mdx
René Wang 3dfc86fd0f
feat: Update user guide & changelog (#11518)
* feat: Redesign doc

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* feat: Uopdate content

* chore: New doc

* chore: Update content

* chore: Update content

* chore: add images

* chore: add images

* chore: add images

* chore: add images

* feat: Add more images

* feat: Add more images

* fix: Cannot reach end

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* Revise README content and structure

Updated README to reflect changes in project description and removed outdated notes.

* Revise 'Getting Started' and TOC in README

Updated the 'Getting Started' section and modified the table of contents.

* chore: Update content

* Revise README structure and content

Updated the Getting Started section and removed the Table of Contents. Adjusted the Local Development instructions.

* Remove custom themes section from README

Removed section about custom themes from README.

* Update README.md

* Refine introduction and highlight cloud version

Updated wording for clarity and added recommendation for cloud version.

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* fix: add missing translation

* 🔀 chore: Move README changes to feat/readme branch

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: add missing translation

* chore: update cdn

* docs: add migration guide from v1.x local database to v2.x and update help sections

Signed-off-by: Innei <tukon479@gmail.com>

* fix: add missing translation

* fix: add missing images

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* style: update cdn

---------

Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: canisminor1990 <i@canisminor.cc>
Co-authored-by: Innei <tukon479@gmail.com>
2026-01-26 15:28:33 +08:00

79 lines
2 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 在 LobeHub 中 配置数据统计服务环境变量指南
description: 了解如何在 LobeHub 中配置各种数据统计服务的环境变量包括Vercel Analytics、Google Analytics 等。
tags:
- 数据统计
- 环境变量
- Vercel Analytics
- Google Analytics
- Posthog Analytics
- Umami Analytics
---
# 数据统计
我们在 LobeHub 中集成了若干免费 / 开源的数据统计服务,用于了解用户的使用情况,以下是相关环境变量。
## Vercel Analytics
### `ENABLE_VERCEL_ANALYTICS`
- 类型:可选
- 描述:用于配置 Vercel Analytics 的环境变量,当设为 `1` 时开启 Vercel Analytics
- 默认值: `-`
- 示例:`1`
### `DEBUG_VERCEL_ANALYTICS`
- 类型:可选
- 描述:用于开启 Vercel Analytics 的调试模式
- 默认值: `-`
- 示例:`1`
## Google Analytics
### `GOOGLE_ANALYTICS_MEASUREMENT_ID`
- 类型:必选
- 描述Google Analytics 的 Measurement ID填写此项后将自动开启 Google Analytics
- 默认值: `-`
- 示例:`G-63LP2TV03T`
## Posthog Analytics
### `POSTHOG_KEY`
- 类型:必选
- 描述:设置 PostHog 项目 Key设置此项后将自动开启 PostHog Analytics
- 默认值: `-`
- 示例:`phc_xxxxxxxx`
### `POSTHOG_HOST`
- 类型:可选
- 描述:设置 PostHog 服务的部署地址,默认为官方的 SaaS 地址
- 默认值:`https://app.posthog.com`
- 示例:`https://example.com`
### `POSTHOG_DEBUG`
- 类型:可选
- 描述:开启 PostHog 的调试模式
- 默认值: `-`
- 示例:`1`
## Umami Analytics
### `UMAMI_WEBSITE_ID`
- 类型:必选
- 描述:你的 Umami 的 Website ID填写此项后将自动开启 Umami Analytics
- 默认值:`-`
- 示例:`E738D82A-EE9E-4806-A81F-0CA3CAE57F65`
### `UMAMI_SCRIPT_URL`
- 类型:可选
- 描述Umami 脚本的网址,默认为 Umami Cloud 提供的脚本网址
- 默认值:`https://analytics.umami.is/script.js`
- 示例:`https://umami.your-site.com/script.js`