Skip to content

chore: report docs to main-site GA4 and track code and prompt copies - #3075

Merged
killme2008 merged 5 commits into
mainfrom
chore/ga4-main-site-property
Dec 3, 2026
Merged

killme2008 merged 5 commits into
mainfrom
chore/ga4-main-site-property

Conversation

@killme2008

@killme2008 killme2008 commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

What changed

docs.greptime.com and docs.greptime.cn only reported to its own GA4 property (G-BYNN8J57JZ), so docs traffic was missing from the greptime.com property (G-NZ5YFGCPMY). Both the English and Chinese builds now configure both IDs.

Page views on route change and the AgentOnboarding events are sent without send_to, so they go to both properties.

The code block copy button now sends a code_copy event with page_path after a successful copy.

AgentOnboarding keeps agent_onboarding_copy and also sends prompt_copy with page_path and copy_source: 'docs_agent_onboarding', the same shape the greptime.com site uses.

Scope

  • Documentation versions: N/A (site config)
  • Languages: English, Chinese

Verification

pnpm build and DOC_LANG=zh pnpm build: generated pages contain gtag("config", ...) for both IDs. On the served build, clicking a copy button pushes ["event", "code_copy", {"page_path": "/getting-started/installation/greptimedb-standalone/"}] to dataLayer. Clicking the prompt copy button on / pushes agent_onboarding_copy and ["event", "prompt_copy", {"page_path": "/", "copy_source": "docs_agent_onboarding"}].

Checklist

  • I verified the content against the applicable GreptimeDB version.
  • I updated the relevant documentation versions and languages, or explained why not.
  • I checked changed links and anchors.
  • I updated navigation when the document structure changed.
  • For a version cut, stable promotion, or feature backport, I reviewed Nightly upgrade entries against the target release, updated both Nightly and versioned English/Chinese guides, and recorded release evidence and the outcome (or marked this not applicable).

@killme2008
killme2008 marked this pull request as ready for review December 3, 2026 09:10
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Deploying greptime-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: bf8849a
Status: ✅  Deploy successful!
Preview URL: https://6c55a2e5.greptime-docs.pages.dev
Branch Preview URL: https://chore-ga4-main-site-property.greptime-docs.pages.dev

View logs

@killme2008 killme2008 changed the title chore: report English docs to the main-site GA4 property chore: report docs to main-site GA4 and track code copies Dec 3, 2026
@killme2008 killme2008 changed the title chore: report docs to main-site GA4 and track code copies chore: report docs to main-site GA4 and track code and prompt copies Dec 3, 2026
@killme2008
killme2008 merged commit 0b48e5c into main Dec 3, 2026
5 checks passed
@killme2008
killme2008 deleted the chore/ga4-main-site-property branch December 3, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants