From c69b092f20035375655962782f01317930d4ecfa Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 24 Jun 2022 09:26:40 -0400 Subject: [PATCH] FeedbackLink: Add tracking (#51251) (#51377) (cherry picked from commit 0d899e2635eaadfdb98c2eec6bfb4a478375682f) Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> --- .../prometheus/querybuilder/shared/FeedbackLink.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/prometheus/querybuilder/shared/FeedbackLink.tsx b/public/app/plugins/datasource/prometheus/querybuilder/shared/FeedbackLink.tsx index 6aca403220c..ef0b03a76a0 100644 --- a/public/app/plugins/datasource/prometheus/querybuilder/shared/FeedbackLink.tsx +++ b/public/app/plugins/datasource/prometheus/querybuilder/shared/FeedbackLink.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { GrafanaTheme2 } from '@grafana/data'; import { Stack } from '@grafana/experimental'; -import { config } from '@grafana/runtime'; +import { config, reportInteraction } from '@grafana/runtime'; import { Icon, useStyles2 } from '@grafana/ui'; export interface Props { @@ -25,6 +25,11 @@ export function FeedbackLink({ feedbackUrl }: Props) { title="This query builder is new, please let us know how we can improve it" target="_blank" rel="noreferrer noopener" + onClick={() => + reportInteraction('grafana_feedback_link_clicked', { + link: feedbackUrl, + }) + } > Give feedback