-
Notifications
You must be signed in to change notification settings - Fork 11
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 configuration #249
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kylelaker
commented
Feb 10, 2022
rgauss
reviewed
Feb 10, 2022
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.
Possible alternative, looks like linting is complaining about other stuff as well.
rgauss
approved these changes
Feb 14, 2022
This adds basic, optional configuration of Google Analytics *if* the `REACT_APP_GOOGLE_ANALYTICS` environment variable is present at the time that `npm run build` is executed. This makes it easy to integrate and fairly self-contained. While the react-ga library's code will be bundled into the deployed app and the code to do the configuration will be as well, the initialize won't actually happen unless that value was present at build time. At the moment, we just initialize and collect default metrics and perform a "pageview" action within the App's `useEffect` (which we may want to consider moving to some sort of an action on the Router but we don't seem to have a full Router; we only have a Switch).
Co-authored-by: Ray Gauss II <rgauss@easydynamics.com>
kylelaker
force-pushed
the
feature/add-google-analytics
branch
from
February 14, 2022 23:56
f26ff73
to
23b5c0e
Compare
kylelaker
force-pushed
the
feature/add-google-analytics
branch
from
February 15, 2022 17:42
23b5c0e
to
b7409f1
Compare
zachclark-ccpo
approved these changes
Feb 16, 2022
zclarkEDC
approved these changes
Feb 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds basic, optional configuration of Google Analytics if the
REACT_APP_GOOGLE_ANALYTICS
environment variable is present at the timethat
npm run build
is executed. This makes it easy to integrate andfairly self-contained. While the react-ga library's code will be bundled
into the deployed app and the code to do the configuration will be as
well, the initialize won't actually happen unless that value was present
at build time.
At the moment, we just initialize and collect default metrics and
perform a "pageview" action within the App's
useEffect
(which we maywant to consider moving to some sort of an action on the Router but we
don't seem to have a full Router; we only have a Switch).