-
Notifications
You must be signed in to change notification settings - Fork 710
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
convert to the GA4 data API #5973
Conversation
f33abf7
to
969ac79
Compare
969ac79
to
00a68e5
Compare
00a68e5
to
a6a7ff7
Compare
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.
This is so much cleaner overall!. Just a few changes (maybe).
Thanks!
7a7a4f5
to
7911885
Compare
7911885
to
e3fdc46
Compare
e3fdc46
to
ee79ab8
Compare
I just tested the new |
mozilla/sumo#1705
This PR will also resolve the following bugs:
mozilla/sumo#1140
mozilla/sumo#1169
This PR converts our current GA3 API queries to GA4 data API queries.
Please merge https://github.com/mozilla-it/webservices-infra/pull/1949 immediately prior to merging this PR.
Prior to releasing the code in this PR, make sure https://github.com/mozilla-it/webservices-infra/pull/1950 is merged.
Notes
RunReportRequest
instances for each case by running each of the functions locally using the stage GA-specific service account.pageviews_by_document
, are now generator functions.pageviews_by_document
function is much more efficient that its predecessor, for the following reasons:pageview_by_document
function, because it used theDocument.from_url
class method, would sometimes associate the page views of a localized KB article with a different KB article, for example with its parent, if the localized article no longer existed. This is no longer the case. The page views for a KB article of a given locale and slug are now only associated with that exact KB article or nothing at all if the article no longer exists.