-
Notifications
You must be signed in to change notification settings - Fork 30
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
591, 543: upgrade React, use Google Analytics module for OneTrust privacy banner #594
591, 543: upgrade React, use Google Analytics module for OneTrust privacy banner #594
Conversation
Thanks for contributing this! I was noticing that I was cleaning up the env in #554 so that may need to be committed first so it's documented there. |
Would adding it as a secret in the new .env require a kustomize process to be run? I remember discussing this with @lsloan a while back and he created issue #523 to address it. If .env is a good workaround without too much trouble I'm fine with waiting for that PR to merge first before adding it |
useGoogleAnalytics(props.globals.ga_tracking_id, props.globals.debug); | ||
useGoogleAnalytics({ | ||
googleAnalyticsId: props.globals.ga_tracking_id, | ||
debug: props.globals.debug, |
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.
What does this package do when debug is turned on? I couldn't find that in the README for that project but might be useful to document there. Does it log anything to the console or do anything?
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.
From what I've seen, the debug prop was inherited from the first implementation of google analytics, apparently it just enables testMode
for the googleAnalytics instance, which is useful only for testing event calls. I think this prop should be renamed to testMode and we utilize debug
for logging, like you said.
I created an issue to address this in the project tl-its-umich-edu/react-ga-onetrust-consent#7
Getting this error trying it out, were you seeing this one? I'm not sure what it means yet as is in a component.
|
So it seems like this might be an issue more with the upgrade of react and 2 different versions of react-router-dom being loaded? It looks like both 6.25.1 and 6.28.1 are added? I added this to package.json and that seems to get it loaded. Do you know if this is the best way? It looks like onetrust might be the only one that has an old version to updating that might also fix this, but possible save to have this in here?
|
I think updating it in the module may make the most sense in this case, no need to put in an override as it might lead to dependency issues in the future. Open to other suggestions but I'll just go ahead with that patch as version 1.1.2 on react-ga-onetrust-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.
Successfully tested with the test plan and TunnelBear VPN settings.
The updated google analytics module uses react 18.3 so including the upgrade in this PR should help with testing.
Locally testing is possible with a VPN although the behavior of the privacy banner may differ from the actual test environment. To locally test using Umich credentials, use the following variables in .env:
GA_TRACKING_ID=G-YYZS5CR145
ONE_TRUST_SCRIPT_DOMAIN=03e0096b-3569-4b70-8a31-918e55aa20da
The test plan for the test environment will follow the same steps commented in the previous google analytics issue: #493 (comment)