Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial GA4 Analytics Configuration #209

Closed
3 tasks done
davidsmejia opened this issue Oct 10, 2023 · 1 comment · Fixed by #305
Closed
3 tasks done

Initial GA4 Analytics Configuration #209

davidsmejia opened this issue Oct 10, 2023 · 1 comment · Fixed by #305
Assignees

Comments

@davidsmejia
Copy link
Contributor

davidsmejia commented Oct 10, 2023

Context

Epic: #302

We need to do some basic tracking to understand how users interact with refinebio-web.

Problem or idea

We want to initially look at default report generated by just dropping in GA4 and then doing internal site-wide testing.
We should limit the accompanying PR to only contain the addition of react-ga4 and the requisite configuration.

A future Issue will be made to track if we should create a hook and individual tracking elements.

Solution or next step

Edited by @nozomione

  • Provide GA4 measurement IDs @davidsmejia
  • Set up production and staging environmental variables in the next config and Vercel @nozomione
    • GA4_MEASUREMENT_ID
    • STAGE_GA4_MEASUREMENT_ID
  • GA4 Integration @nozomione
    • (approach 1) Add GA4 script to the project
    • (approach 2) Install a project dependency react-ga4 and pass GA4 measurement ID

NOTE The approach 1 was taken and the gtag function can be used to set up our custom events, so the react-g4 package was not added.

@davidsmejia
Copy link
Contributor Author

The code for analytics can now be found in 1password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants