-
Notifications
You must be signed in to change notification settings - Fork 64
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: Add GoogleAnalytics 4 to frontend-platform #472
Conversation
Thanks for the pull request, @UvgenGen! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #472 +/- ##
==========================================
+ Coverage 81.76% 82.29% +0.52%
==========================================
Files 38 39 +1
Lines 938 966 +28
Branches 172 176 +4
==========================================
+ Hits 767 795 +28
Misses 159 159
Partials 12 12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
src/initialize.js
Outdated
@@ -157,6 +158,13 @@ export async function runtimeConfig() { | |||
} | |||
} | |||
|
|||
export async function loadExternalScripts(externalScripts, data) { |
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.
I think we can just remove async
from this function, yeah? We're not awaiting it where it's called, and it has no await
keywords in it.
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.
Gorgeous. 🤩
One tiny nit about an async
keyword, but this looks great. I'm approving so you don't feel like you need a re-review, but I do think we should remove the async
keyword from loadExternalScripts
.
d01ba47
to
292d2fe
Compare
@davidjoy Thank you) I removed the |
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.
Sorry for the radio silence, I was off the last couple of days. This looks good to me as well, are any changes needed to openedx/edx-platform#32032 to support this? I'm not sure if I'm reading it wrong, but the reference to MFE_CONFIG
here seems different from what's in there.
Also pinging @arbrandes since he was involved in the last solution, just to make sure I'm not missing anything we'd planned for there.
@bmtcril no changes needed for edx-platform. We use two settings:
|
Thanks for all of the work on this, Adolfo is away for a bit so I don't think there's any need to wait on his review. 👍 |
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.
Looks good!
@UvgenGen 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description:
alternative implementation for #471
Added support for GA4 to frontend-platform:
or, the ID can be set in the frontend-platform .env file as:
GOOGLE_ANALYTICS_4_ID="G-TEST"
Merge checklist:
frontend-platform
. This can be done by runningnpm start
and opening http://localhost:8080.module.config.js
file infrontend-build
.fix
,feat
) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.Post merge: