uiowa / brand-icon-browser

0 stars 1 forks source link

Enables Google Analytics 4 #64

Closed quamsta closed 2 years ago

quamsta commented 2 years ago

Resolves #26

This PR conditionally adds the GA4 script to index.html when building for production only (GA is disabled in development mode) and uses the gtag() function to record the following events:

GA4 automatically tracks page views (page_view) and link clicks/downloads (gtm.linkClick) so these events aren't tracked programmatically.

Additionally, the "Privacy Notice" link is added to the app, below the "Download All" button.

Screen Shot 2022-07-05 at 9 21 40 AM