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

Add google analytics #153

Merged
merged 7 commits into from
Feb 29, 2024
Merged

Add google analytics #153

merged 7 commits into from
Feb 29, 2024

Conversation

swh00tw
Copy link
Collaborator

@swh00tw swh00tw commented Feb 28, 2024

Description

Add google analytics to track viewers and gain insight into users' behaviors.

Related Issue

Notes

  • Add GA
  • Use zod to parse environment variables.
    By doing so, if you have a misconfiguration in your .env (e.g. you forget to add some env vars), it will result in build-time error (for server config) or run-time error (for client-config). So that you can identify bugs when testing or building. It's better since the bug or error can be identified earlier before deploying to prod.

Testing link: https://rec-f8x3073i7-recnet-542617e7.vercel.app/

TODO

  • Paste the testing link

Copy link

vercel bot commented Feb 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rec-net ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 29, 2024 6:07am

});

if (!clientEnvRes.success) {
// console.error(clientEnvRes.error.issues);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] do we need this?

Copy link
Collaborator Author

@swh00tw swh00tw Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should preserve this so that if other developers (assume we have other dev in our team) run the app on their local machine without proper .env, an error will be thrown to let them know. Plus, we can catch the env error when testing before merging into prod.

@@ -1,7 +1,8 @@
import { cn } from "@/utils/cn";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] change the filename to camel case

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swh00tw swh00tw merged commit 6c2db87 into master Feb 29, 2024
3 checks passed
@swh00tw swh00tw deleted the feat/add-ga branch March 1, 2024 03:30
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 this pull request may close these issues.

2 participants