-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Google Analytics support #97
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! LGTM. Anything from your side, @git-anurag-hub? If not, I think you can go ahead and merge
@@ -1,5 +1,7 @@ | |||
import { useEffect } from 'react'; | |||
import 'vanilla-cookieconsent'; | |||
import Cookies from 'js-cookie'; | |||
import ReactGA from 'react-ga4'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using a seperate library for the google anylatics support. This method will increase the size of the build & slow down app a little. Better option will be to put the inject the script into the head of the page. Check this out: https://mariestarck.com/add-google-analytics-to-your-next-js-application-in-5-easy-steps/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true @git-anurag-hub, but I guess, we may run not able to track cookies as per user instructions. Script will be inserted in the webpage, regardless of user consent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that's of course important. What do you say, @git-anurag-hub, do you know a better method that still regards the user's consent? If not, I guess you can resolve the issue and merge.
Thanks @tanya17-05
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try this https://developers.google.com/tag-platform/devguides/consent#gtag.js. We can manage the consent with the help of core gtag implementation without needing any library!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@git-anurag-hub: Any update on this? Would be nice to get this in...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I actually did review this but forgot to hit submit so the review was pending from March 2nd. Will take this on priority!
* update workflow, build and deploy on OC * change secrets, according https://github.com/elixir-cloud-aai/landing-page/issues/57\#issuecomment-1458044898 * add name to new-app * update build.yaml. Make sure to expose the right service
@@ -1,5 +1,7 @@ | |||
import { useEffect } from 'react'; | |||
import 'vanilla-cookieconsent'; | |||
import Cookies from 'js-cookie'; | |||
import ReactGA from 'react-ga4'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try this https://developers.google.com/tag-platform/devguides/consent#gtag.js. We can manage the consent with the help of core gtag implementation without needing any library!
* chore: update deps * fix: background image * fix: yarn * fix: ci issues * fix: ci * style: news
resolves #52
to see logs use google analytics debugger chrome extension