Skip to content

🔧 Fix Google Analytics Config for Docusaurus v3#4

Merged
rafael-ledgerlink merged 1 commit intomainfrom
fix-google-analytics-config
Oct 8, 2025
Merged

🔧 Fix Google Analytics Config for Docusaurus v3#4
rafael-ledgerlink merged 1 commit intomainfrom
fix-google-analytics-config

Conversation

@Ruben-ledgerlink
Copy link
Contributor

🐛 Bug Fix

This PR fixes the Google Analytics configuration to be compatible with Docusaurus v3.

❌ The Problem

The previous PR (#3) placed the gtag configuration in themeConfig, which causes a build error in Docusaurus v3:

The "gtag" field in themeConfig should now be specified as option for plugin-google-gtag.

✅ The Solution

  • Moved gtag configuration from themeConfig to the preset-classic options
  • This is the correct location for Docusaurus v3+ as per the migration guide

📊 Configuration

  • Tracking ID: G-NF34XVDCDD
  • IP Anonymization: Enabled 🔒

🧪 Testing

This change fixes the GitHub Pages deployment build error. Once merged, the site will build successfully and tracking will work properly.


Fixes the deployment issue! Ready to merge 🚀

- Move gtag config from themeConfig to preset options
- Fixes build error: gtag field must be in plugin-google-gtag options
- Required for Docusaurus v3 compatibility
@rafael-ledgerlink rafael-ledgerlink merged commit ae2cc2e into main Oct 8, 2025
@rafael-ledgerlink rafael-ledgerlink deleted the fix-google-analytics-config branch October 8, 2025 08: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.

3 participants