-
Notifications
You must be signed in to change notification settings - Fork 215
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: SELECT_EXTERNAL_SOURCE #1158
Conversation
Size Change: +4.79 kB (+1%) Total Size: 862 kB
ℹ️ View Unchanged
|
Full-stack documentation: https://docs.openverse.org/_preview/1158 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
0258fd8
to
a26e166
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.
I think we should also include which part of the UI the external source was selected from in something like a uiComponent
param alongside the event.
b2f927d
to
1b66caf
Compare
This PR has migrations. Please rebase it before merging to ensure that conflicting migrations are not introduced. |
1b66caf
to
fff61af
Compare
frontend/src/components/VHeader/VHeaderMobile/VContentSettingsButton.vue
Outdated
Show resolved
Hide resolved
ed7cf3b
to
c6dacd4
Compare
c6dacd4
to
b35d185
Compare
058f6a2
to
a6b9c09
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.
Perfect! LGTM.
a6b9c09
to
9b7335a
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.
I don't understand the goal behind the url
property (ambiguous name aside). Here are my two testing examples:
Stored in this way, I don't know what we'll be able to use these for. For one, it isn't easy to query any information against this field that isn't easier elsewhere (specifically query and name). On top of that, it effectively duplicates the name and the query.
My question boils down to: what is the goal for the url
payload data that isn't covered by the other payload items?
page.on("request", (req) => { | ||
if (req.method() === "POST") { | ||
const requestData = req.postDataJSON() | ||
if (requestData?.n == "SELECT_EXTERNAL_SOURCE") { | ||
eventData = JSON.parse(requestData?.p) | ||
} | ||
} | ||
}) |
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.
It would be cool to abstract this out into a utility or custom Playwright fixture that provides this more generally (like a list of all events that get sent that can be asserted against).
Edit for clarity: not as part of this PR but as a separate DevEx issue.
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.
Issue created: #1992
frontend/src/types/analytics.ts
Outdated
/** The name of the external source */ | ||
name: string | ||
/** The full URL of the source */ | ||
url: string |
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.
Can this be renamed to externalSourceUrl
just to disambiguate it a bit?
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 removed the url
entirely, as it does not provide much useful non-duplicated information.
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.
Agree with changes suggested by Sara. Everything else LGTM.
9b7335a
to
573823f
Compare
I've removed url
from the payload as suggested, and there are 2 other approvals
Fixes
Fixes #1076 by @dhruvkb
Description
This PR adds
SELECT_EXTERNAL_SOURCE
event that is triggered when the user clicks on one of theexternal source
buttons inside the External sources popover/modal below the search results or on one of the buttons on the "No results" page.The buttons are also updated to use the new variants and sizes.
Testing Instructions
Run analytics and the frontend dev server. Click on one of the external sources below the search results or search for "nonexistentquery" and click on one of the buttons on the "No results" page.
You should see the event in Plausible.
Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin