Closed jaydonkrooss closed 4 months ago
I will review it in the morning.
Is there any resource/site you were looking at when implementing this code? I don't have much background with onetrust and adding the cookie banner. If you provide a source to reference that would to helpful to review.
I will try to test it on Dev instance as @jaydonkrooss provided a link.
Is there any resource/site you were looking at when implementing this code? I don't have much background with onetrust and adding the cookie banner. If you provide a source to reference that would to helpful to review.
Here's my high level understanding of what should happen based on the Umich cookie disclosure instructions under "Google Analytics / Tag manager" section. I've also seen similar instructions on google analytics and onetrust documentation:
I'll try to add clearer comments and better variable storage. Mainly the challenge has been trying to find out how to combine the oneTrust expected behavior with Google Analytics react library, instead of using purely JS script tags.
I feel the code is cleaned up a lot and useEffect in the oneTrust component is simplified. I did not test his but @zqian seems to be testing all the useCase. I feel if the code is working as expected then @zqian will be the approver.
@jaydonkrooss Thanks for adding all the comment I feel the code is now easier to understand.
Attempt to adapt the oneTrust cookie disclosure as specified by umich resources: https://vpcomm.umich.edu/resources/cookie-disclosure/
Uses react effects to keep track of the user's selections and update google analytics tags accordingly.
see VPN test plan here: https://github.com/tl-its-umich-edu/remote-office-hours-queue/issues/493#issuecomment-2197611029