From 0d899e2635eaadfdb98c2eec6bfb4a478375682f Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Fri, 24 Jun 2022 15:08:24 +0200 Subject: [PATCH] FeedbackLink: Add tracking (#51251) --- .../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