Components

GoogleAnalytics

<GoogleAnalytics />

Constructor

# <GoogleAnalytics />

Google Analytics Component can be used for analytics purposes. This supports GA4 and the older version. Id will be picked from Amp config of BOLD. Settings > Configure > AMP > GA tracking id.

GA4 config will be picked up from featureConfig Example: ... ampRoutes(app, { featureConfig: { analytics: { googleAnalytics: { id: "G-XXXXXXXX" } } } }) ...

View Source atoms/google-analytics/google-analytics.tsx, line 84