feat(growth): UTM 跟踪 doc 分享 + turbopack root 锁定#334
Merged
longsizhuo merged 1 commit intomainfrom May 6, 2026
Merged
Conversation
恢复自 i18n PR 之前 stash 出来的 utm-tracking 工作。
UTM 跟踪:
- README badge / logo 链接加 utm_source=github,utm_medium=readme,
utm_campaign={logo,badge},让 GA Source 维度看到 GitHub 入站流量
- DocShareButton 复制链接时打 utm_source=doc_share,utm_medium=user_share,
用户分享到 DC/微信/X 后回流在 GA 看到,区别于 (direct)/(none)
turbopack root:
- next.config.mjs 显式锁定 turbopack root 和 outputFileTracingRoot 到
frontend/ 自己目录。Next.js 16 默认会向上搜 lockfile 推 workspace root,
开发机上 /home/ubuntu/package-lock.json 之类的会把 root 推到上层,
turbopack 解析 node_modules 错位 → "Can't resolve 'tailwindcss'" 类报错。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
i18n PR (#330) 之前
feat/utm-tracking分支上有几个零散改动,PR 开始时 stash 出来避免和 i18n 大重构混在一起。本 PR 恢复这些工作。内容
1. UTM 跟踪 GitHub README 入站流量
README.md/README.en.md的 logo 和 badge 链接:GA Source 维度可以分清"从 GitHub readme logo 进站" vs "从 badge 进站"。
2. UTM 跟踪用户主动分享 doc 链接
DocShareButton.tsx用户点"复制链接"时:用户复制到 Discord / 微信 / X 之后,回流时 GA 能看到
doc_sharesource,区别于(direct)/(none),能定量看出"用户主动分享"对站点流量的贡献。3. turbopack root 显式锁定(次要工程改动)
next.config.mjs加:Next.js 16 默认会向上搜 lockfile 推 workspace root。开发机
/home/ubuntu/package-lock.json这类上层 lockfile 会把 root 推到上层,turbopack 解析 node_modules 错位 →Can't resolve 'tailwindcss'之类报错。锁死 root 防 dev 翻车。Test plan
github / readme和doc_share / user_sharesource