-
Notifications
You must be signed in to change notification settings - Fork 515
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
chore(telemetry): measure menu clicks #9918
Conversation
@@ -58,6 +61,9 @@ export const Submenu = ({ | |||
className={`submenu-item ${ | |||
item.url.startsWith("https://") ? "external" : "" | |||
}`} | |||
onClick={() => | |||
gleanClick(`${MENU.CLICK_SUBMENU}: ${item.url}`) |
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.
That's used in a lot of places, maybe we want to add something like gleanEnabled
?
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.
Since we only measure clicks on submenu items with a url, this will effectively only measure clicks on the main menu and on the user menu. To distinguish these, I now added the menu id to the click source.
This reverts commit 9184fa9.
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.
👍
Summary
Problem
We don't know how many users click on the menu items in the top navigation (main menu and user menu).
Solution
Add measurements.
How did you test this change?
Ran
yarn && yarn dev
with the following environment variables (in.env
):Then visited http://localhost:3000/en-US/, clicked on menu and submenu items and verified that these show up in our Glean debug pings viewer.