-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: Update Matomo initialization #1114
Conversation
@@ -416,7 +416,7 @@ describe('Analytics context', () => { | |||
'setDocumentTitle', | |||
'Test Doc Title', | |||
]) | |||
expect(windowWithAnalytics._paq[1]).toEqual(['setDoNotTrack', true]) | |||
expect(windowWithAnalytics._paq[1]).toEqual(['setDoNotTrack', false]) |
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.
We talked about this during one of our meetings and decided it should be a launch darkly flag. Suggestion is to name it MatomoClientSideDoNotTrack
and have it return true or false to be set here.
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.
After initial investigation this wasn't working, not sure that LD is initialized early enough for it two work. So we decided to just leave it as is for now so we can confirm it allows us to track rank and location properly.
@@ -416,7 +416,7 @@ describe('Analytics context', () => { | |||
'setDocumentTitle', | |||
'Test Doc Title', | |||
]) | |||
expect(windowWithAnalytics._paq[1]).toEqual(['setDoNotTrack', true]) | |||
expect(windowWithAnalytics._paq[1]).toEqual(['setDoNotTrack', false]) |
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.
After initial investigation this wasn't working, not sure that LD is initialized early enough for it two work. So we decided to just leave it as is for now so we can confirm it allows us to track rank and location properly.
SC-2582
Proposed changes
This PR
setDoNotTrack
option in Matomo's initialization tofalse
trackRank
andtrackBaseLocation
into auseEffect
Reviewer notes
Setup
Start the system
yarn services:up yarn dev cd ../ussf-portal-cms yarn dev
Login to the portal http://localhost:3000
Start storybook
Login to storybook http://localhost:6006, though the command above should open it for you
Code review steps
As the original developer, I have
As a reviewer, I have
Check out our How to review a pull request document.
Screenshots