-
Notifications
You must be signed in to change notification settings - Fork 214
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 an analytics event for search results count #5109
Conversation
@obulat Could you please advise how to find the problem that caused my PR to fail during "CI + CD / Lint files" test, as I can see there is some kind of problem with "prettier" in error logs? |
Good afternoon @obulat, I would like to ask your opinion on the work done, is the merge request valid? |
Based on the contributor urgency of this PR, the following reviewers are being gently reminded to review this PR: @obulat Excluding weekend1 days, this PR was ready for review 6 day(s) ago. PRs labelled with contributor urgency are expected to be reviewed within 3 weekday(s)2. @Danil49, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings. Footnotes
|
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.
Tested well locally! Thank you for your contribution, @Danil49 ✨
Fixes
Fixes #4561 by @obulat
Description
This PR introduces a new analytics event,
GET_SEARCH_RESULTS
, that logs the number of results returned for each user search query for each media type (image and audio). By addingGET_SEARCH_RESULTS
, we gain insight into queries that yield few or no results, enabling us to better understand and address potential gaps in openverse search capabilities.As was advised in issue #4561 a
GET_SEARCH_RESULTS
event was placed near the existingSUBMIT_SEARCH
event. The very sending of the event was implemented in thefetchSingleMediaType
function before we return mediaCount, if page is 1 (so, it fires once per a search term, and does not fire when user clicks on Load more)Testing Instructions
Project setup and initialisation was done according to the General setup guide, but despite this, for some reason analytical events were not sent to the Plausible server (http://0.0.0.0:50288/localhost), as it was unreachable for none of them. Even though it was started, initialised and there were no visible errors in logs. So, this didn't give the ability to test and see the stats directly in the form of a chart etc on Plausible server.
Despite this operability can be tested using the developer tools in the browser. The following image shows that events are successfully sent as intended without any visible bugs.
Checklist
Update index.md
).main
) or a parent feature branch.ov just catalog/generate-docs
for catalogPRs) or the media properties generator (
ov just catalog/generate-docs media-props
for the catalog or
ov just api/generate-docs
for the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin