-
Notifications
You must be signed in to change notification settings - Fork 218
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
Analytics event: SUBMIT_SEARCH
#2120
Conversation
Size Change: +179 B (0%) Total Size: 834 kB
ℹ️ View Unchanged
|
830ddbd
to
f493115
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.
Looks good, I can see the events showing up in the console! I wasn't able to get plausible setup, but I'll do that on my own at some point in the interest of time.
5f78d52
to
3d1fc03
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.
Does this PR also involve style changes along with the analytics event?
Not style changes, but refactoring of the search button. The old search button used to have logic to decide whether to show an icon or a text label, and there were two different components for StandaloneSearchBar and the SearchBar - I combined them in this PR. Edited to add: @dhruvkb , I've extracted the style changes to a separate PR and rebased this on it. |
affda65
to
9106907
Compare
9dd91a3
to
27167a7
Compare
9106907
to
23377ba
Compare
23377ba
to
b2292ed
Compare
Based on the high urgency of this PR, the following reviewers are being gently reminded to review this PR: @dhruvkb Excluding weekend1 days, this PR was ready for review 5 day(s) ago. PRs labelled with high urgency are expected to be reviewed within 2 weekday(s)2. @obulat, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings. Footnotes
|
Fixes
Fixes #1068 by @obulat
Description
This PR adds a
SUBMIT_SEARCH
analytics event that is fired when the search is submitted from the homepage, the search bar in the search page header, and the 404 page.This PR also simplifies theEdit: Extracted to standalone PR #2148.VSearchButton
component removing the version that used a text label, and using it in both the SearchBar and the StandaloneSearchBar (which is used on 404 and home pages, and does not remove the search text when the server-rendered page is hydrated).The unused input sizes (standalone/large) are also removed.
Home page directly imports the child components instead of lazy-loading them, because they are always loaded anyways.
Testing Instructions
Set up analytics (
just frontend/up
,just frontend/init
) and run the app (just frontend/run dev
).Open the app (localhost:8443) and the analytics server (http://0.0.0.0:50288/).
Try executing searches from all three places in the description, and see that the Custom events section1 shows the events correctly.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin
Footnotes
https://docs.openverse.org/frontend/guides/analytics.html#custom-events ↩