Skip to content

[Dashboard Navigation] Add Links telemetry#171877

Merged
Heenawter merged 7 commits intoelastic:mainfrom
Heenawter:add-links-telemetry_2023-11-22
Nov 27, 2023
Merged

[Dashboard Navigation] Add Links telemetry#171877
Heenawter merged 7 commits intoelastic:mainfrom
Heenawter:add-links-telemetry_2023-11-22

Conversation

@Heenawter
Copy link
Contributor

@Heenawter Heenawter commented Nov 23, 2023

Closes #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

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

@Heenawter Heenawter added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. backport:skip This PR does not require backporting Project:Dashboard Navigation Related to the Dashboard Navigation Project labels Nov 23, 2023
@Heenawter Heenawter self-assigned this Nov 23, 2023
* Dashboard-to-dashboard navigation
*/
const { loading: loadingOnClickProps, value: onClickProps } = useAsync(async () => {
const onClickProps = useMemo(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was accidentally left async in #167928 when it should have been removed.

@kibana-ci
Copy link

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
links 33.6KB 34.0KB +366.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Heenawter

@Heenawter Heenawter marked this pull request as ready for review November 23, 2023 22:05
@Heenawter Heenawter requested review from a team as code owners November 23, 2023 22:05
@elasticmachine
Copy link
Contributor

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

@nickpeihl nickpeihl self-requested a review November 27, 2023 13:54
Copy link
Contributor

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

code review and tested usage collection using this script. Dashboard and external links both report clicks.

@Heenawter Heenawter merged commit 31a8b7b into elastic:main Nov 27, 2023
@Heenawter Heenawter deleted the add-links-telemetry_2023-11-22 branch November 27, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting 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 release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v8.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

6 participants