mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* chore: track plugin install and uninstall events * chore: pass the type of the plugin to the tracking as well
19 lines
654 B
TypeScript
19 lines
654 B
TypeScript
import { reportInteraction } from '@grafana/runtime';
|
|
|
|
type PluginTrackingProps = {
|
|
// The ID of the plugin (e.g. grafana-azure-monitor-datasource)
|
|
plugin_id: string;
|
|
// The type of the plugin (e.g. 'app' or 'datasource')
|
|
plugin_type?: string;
|
|
// The path where the plugin details page was rendered (e.g. /plugins/grafana-azure-monitor-datasource )
|
|
path: string;
|
|
};
|
|
|
|
export const trackPluginInstalled = (props: PluginTrackingProps) => {
|
|
reportInteraction('grafana_plugin_install_clicked', props);
|
|
};
|
|
|
|
export const trackPluginUninstalled = (props: PluginTrackingProps) => {
|
|
reportInteraction('grafana_plugin_uninstall_clicked', props);
|
|
};
|