AlexsLemonade / refinebio-web

Refinebio Web
https://staging.web.refine.bio
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Implement GA4 custom events script #303

Open nozomione opened 9 months ago

nozomione commented 9 months ago

Context

Epic: https://github.com/AlexsLemonade/refinebio-web/issues/302

We need to implement a script for GA4 custom events to collect and analyze our site data.

Docs for required data collection and custom events: Slab: Analytics Strategy Google sheet Custom events

Problem or idea

We should implement the script for GA4 custom events to track our application data listed in above.

(Note: gtag API was used (is available to use when GA script loads) to implement custom events instead of react-g4 package to reduce the dependencies.)

Solution or next step

Create the custom events script that contains all methods required for data collection (sheet).