Skip to content

Conversation

@MantisClone
Copy link
Member

@MantisClone MantisClone commented Nov 3, 2025

Problem

Beta docs at https://beta.docs.request.network are publicly accessible but not tracked in analytics. Missing data on usage patterns, user journeys from website to docs, and engagement metrics during beta phase.

Proposed Solution

Add GA4 integration to docs.json using the same measurement ID as the main website property. This enables:

  • Unified tracking across request.network and beta.docs.request.network
  • Seamless path exploration from website to docs
  • Historical data collection during beta to inform structural decisions
  • Easy filtering by hostname to separate website vs. docs traffic

Considerations

  • Uses single GA4 data stream approach (not separate stream) to maintain user journey continuity
  • Measurement ID is public and safe to commit (visible in client-side code anyway)
  • GA4 takes 2-3 days to show data in reports; use GA Debugger for immediate verification
  • When migrating to production docs.request.network, same measurement ID maintains data continuity

Summary by CodeRabbit

  • Chores
    • Added Google Analytics 4 integration to track user activity and engagement metrics.

Copilot AI review requested due to automatic review settings November 3, 2025 20:29
@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

A new top-level "integrations" object was added to docs.json containing GA4 configuration with a measurementId. The object is inserted before the "footer" section with no modifications to existing fields.

Changes

Cohort / File(s) Summary
GA4 Integration Configuration
docs.json
Added root-level "integrations" object with GA4 configuration including a measurementId property

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Google Analytics 4 integration for beta docs' directly and clearly describes the main change: adding GA4 integration to the docs.json file for beta documentation.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-google-analytics

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de2fea8 and c25cf19.

📒 Files selected for processing (1)
  • docs.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs.json

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Google Analytics 4 (GA4) tracking to the Mintlify documentation site by configuring a GA4 measurement ID and providing comprehensive setup documentation.

  • Added GA4 integration configuration to docs.json with measurement ID G-F4XSSNMEN6
  • Created detailed setup guide explaining the single GA4 property/stream approach
  • Provided step-by-step instructions for finding and verifying the GA4 measurement ID

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs.json Added GA4 integration configuration with measurement ID
GOOGLE_ANALYTICS_SETUP.md Comprehensive guide for GA4 setup strategy, configuration, troubleshooting, and transition planning
GET_GA4_MEASUREMENT_ID.md Step-by-step instructions for locating and configuring the GA4 measurement ID

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
GOOGLE_ANALYTICS_SETUP.md (1)

32-38: Add language identifier to JSON code block for proper syntax highlighting.

The JSON code block should specify json as the language identifier for proper rendering and syntax highlighting in Markdown.

-```json
+```json
 "integrations": {
   "ga4": {
     "measurementId": "G-XXXXXXXXXX"
   }
 }
-```
+```
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d60b5b2 and de2fea8.

📒 Files selected for processing (3)
  • GET_GA4_MEASUREMENT_ID.md (1 hunks)
  • GOOGLE_ANALYTICS_SETUP.md (1 hunks)
  • docs.json (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
GET_GA4_MEASUREMENT_ID.md

32-32: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (2)
GOOGLE_ANALYTICS_SETUP.md (1)

1-187: Comprehensive setup guide with clear decision rationale.

This documentation effectively complements the GA4 integration by providing clear setup instructions, troubleshooting guidance, and a thoughtful transition plan. The decision log at the end is particularly helpful for future maintainers to understand the architectural choices (single property, unified tracking, etc.).

docs.json (1)

219-223: GA4 integration configuration is correct and Mintlify-compatible.

Mintlify officially supports GA4 via integrations.ga4.measurementId with the measurement ID format G-XXXXXXX (schema enforces ^G pattern). Your configuration with G-F4XSSNMEN6 is valid and no additional fields or setup steps are required. Codebase search confirms this is the first GA4 integration added with no conflicting configurations.

@MantisClone MantisClone merged commit eea313a into main Nov 3, 2025
4 checks passed
@MantisClone MantisClone deleted the add-google-analytics branch November 3, 2025 20:41
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