mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: track share link options (#77240)
This commit is contained in:
parent
e4d1fdc3d0
commit
468d000979
@ -30,6 +30,7 @@ export class ShareLink extends PureComponent<Props, State> {
|
||||
shareUrl: '',
|
||||
imageUrl: '',
|
||||
};
|
||||
this.onCopy = this.onCopy.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
@ -74,7 +75,11 @@ export class ShareLink extends PureComponent<Props, State> {
|
||||
};
|
||||
|
||||
onCopy() {
|
||||
trackDashboardSharingActionPerType('copy_link', shareDashboardType.link);
|
||||
trackDashboardSharingActionPerType('copy_link', shareDashboardType.link, {
|
||||
currentTimeRange: this.state.useCurrentTimeRange,
|
||||
theme: this.state.selectedTheme,
|
||||
shortenURL: this.state.useShortUrl,
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -11,9 +11,14 @@ export function trackDashboardSharingTypeOpen(sharingType: string) {
|
||||
reportInteraction(shareAnalyticsEventNames.sharingCategoryClicked, { item: sharingType });
|
||||
}
|
||||
|
||||
export function trackDashboardSharingActionPerType(action: string, sharingType: string) {
|
||||
export function trackDashboardSharingActionPerType(
|
||||
action: string,
|
||||
sharingType: string,
|
||||
options?: Record<string, unknown>
|
||||
) {
|
||||
reportInteraction(shareAnalyticsEventNames.sharingActionClicked, {
|
||||
item: action,
|
||||
sharing_category: sharingType,
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user