This document explains how to complete the Google Analytics setup for tracking popular sections.
The site has been configured with Google Analytics 4 (GA4) integration using the @docusaurus/plugin-google-gtag plugin.
-
Create a Google Analytics 4 Property:
- Go to Google Analytics
- Create a new GA4 property for your website
- Copy the Measurement ID (format:
G-XXXXXXXXXX)
-
Update the Configuration:
- Edit
docusaurus.config.ts - Replace
G-XXXXXXXXXXon line 70 with your actual Measurement ID
- Edit
-
Verify Installation:
- Deploy the site with your tracking ID
- Check Google Analytics Real-time reports to confirm data collection
The current configuration tracks:
- Page views and navigation
- User sessions and demographics
- Popular content sections
- Search queries (from the search functionality)
- Traffic sources and referrals
The configuration includes anonymizeIP: true to comply with privacy regulations by anonymizing visitor IP addresses.