Usage
Receiving Tracking ID
To enable Google Analytics on your website, you need to create an account on the Google Analytics website. After creating an account, you will receive a tracking ID that you need to add to your website.Adding Tracking ID
To add the tracking ID to your website, you need to set the .env variableNEXT_PUBLIC_GOOGLE_ANALYTICS_ID
to the tracking ID you received from Google Analytics.
Enabling Google Analytics
To enable Google Analytics on your website, setconfig.services.googleAnalytics
to true
in web/config.tsx
jsx web/appConfig.tsx
Recording Events
Follow the Next.js Third Party Libraries documentation. You can see your events underReports
> Realtime
.