Add Google Analytics#134
Merged
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds Google Tag Manager and Google Analytics (gtag) configurations to the Docusaurus site. Feedback suggests avoiding the simultaneous use of both GTM and gtag to prevent double-counting and improve performance, recommending instead that GA4 be managed within GTM. Additionally, the anonymizeIP parameter is noted as redundant for GA4 properties.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Google Analytics tracking to the Docusaurus documentation site by enabling Docusaurus’ built-in Google Tag Manager and Google Global Site Tag integrations.
Changes:
- Configure
googleTagManagerwith containerGTM-MVPNN2in thepreset-classicoptions. - Configure
gtagwith GA4 measurement IDG-J3B5K0YX8BandanonymizeIP: true.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7122aca to
9f71841
Compare
Mirrors the pattern from Couchbase-Ecosystem/cbl-ionic-docs#51: adds googleTagManager (GTM-MVPNN2) and gtag (G-J3B5K0YX8B) plugins inside preset-classic options. The Docusaurus plugins handle SPA navigations correctly out of the box. Verified locally via Chrome DevTools: gtm.js + gtag/js load on initial page, GA4 page_view beacon fires on initial load, and a new page_view beacon fires on client-side navigation with the updated path.
9f71841 to
ea2f436
Compare
azaddhirajkumar
approved these changes
Apr 15, 2026
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.
Summary
Adds Google Analytics tracking to the Docusaurus documentation site, mirroring the pattern from Couchbase-Ecosystem/cbl-ionic-docs#51.
googleTagManager(containerGTM-MVPNN2) andgtag(tracking IDG-J3B5K0YX8B,anonymizeIP: true) inside thepreset-classicoptions inwebsite/docusaurus.config.js.Test plan
npm run buildcompletes cleanly, no plugin warningsgtm.js?id=GTM-MVPNN2andgtag/js?id=G-J3B5K0YX8Bloaders firegoogle-analytics.com/g/collectfires withtid=G-J3B5K0YX8B,en=page_view,ep.anonymize_ip=truepage_viewbeacon fires with the updateddl/dp— verified via Chrome DevTools network inspectionAW-1019232421(configured in the corporate GTM container) also fires, confirming the GTM wiring is live