Skip to content
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

[Dashboard navigation] Report UI counter metrics for click events on links #164305

Closed
Tracked by #154354
nickpeihl opened this issue Aug 21, 2023 · 1 comment · Fixed by #171877
Closed
Tracked by #154354

[Dashboard navigation] Report UI counter metrics for click events on links #164305

nickpeihl opened this issue Aug 21, 2023 · 1 comment · Fixed by #171877
Assignees
Labels
Feature:Dashboard Dashboard related features impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Dashboard Navigation Related to the Dashboard Navigation Project Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@nickpeihl
Copy link
Member

Add UI counter support to capture metrics of link clicks on Links panels.

For each click event we should only need to add something like the follow code, where LINK_TYPE is either dashboardLink or externalLink.

usageCollection?.reportUiCounter(APP_ID, METRIC_TYPE.CLICK, `${LINK_TYPE}:click`);

See the UI Counters section in the usage_collection README.

@nickpeihl nickpeihl added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:medium Medium Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Project:Dashboard Navigation Related to the Dashboard Navigation Project labels Aug 21, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@Heenawter Heenawter added the Feature:Dashboard Dashboard related features label Aug 31, 2023
@Heenawter Heenawter self-assigned this Nov 20, 2023
@Heenawter Heenawter added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Nov 23, 2023
rshen91 pushed a commit to rshen91/kibana that referenced this issue Nov 27, 2023
Closes elastic#164305

## Summary

This PR adds two `uiCounters` to keep track of when something is clicked
in the new Links panel:

1. `dashboardLink:click` - counts when a dashboard link is clicked
2. `externalLink:click` - counts when an external link is clicked

These counters can be tracked via the `kibana-ui-counters` data view on
the telemetry clusters, like so:

![Screenshot 2023-11-23 at 1 37
26 PM](https://github.com/elastic/kibana/assets/8698078/fe719121-73e3-4b53-8440-5a725a1a7c98)

Note that this **only** applies if the `onClick` method is called; if
the user, for example, right clicks on the link and selects "Open in new
tab" instead, this "click" will not be tracked. To my knowledge, there
is no way to track these types of clicks.

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Dashboard Navigation Related to the Dashboard Navigation Project Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants