mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Popover menu: refactor event tracking (#78733)
This commit is contained in:
parent
98c767abd3
commit
ec7d09b8e0
@ -56,7 +56,7 @@ export const PopoverMenu = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
copyText(selection, containerRef);
|
copyText(selection, containerRef);
|
||||||
close();
|
close();
|
||||||
track('copy_selection_clicked', selection.length, row.datasourceType);
|
track('copy', selection.length, row.datasourceType);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{onClickFilterValue && (
|
{onClickFilterValue && (
|
||||||
@ -65,7 +65,7 @@ export const PopoverMenu = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
onClickFilterValue(selection, row.dataFrame.refId);
|
onClickFilterValue(selection, row.dataFrame.refId);
|
||||||
close();
|
close();
|
||||||
track('line_filter_clicked', selection.length, row.datasourceType);
|
track('line_contains', selection.length, row.datasourceType);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -75,7 +75,7 @@ export const PopoverMenu = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
onClickFilterOutValue(selection, row.dataFrame.refId);
|
onClickFilterOutValue(selection, row.dataFrame.refId);
|
||||||
close();
|
close();
|
||||||
track('line_filter_out_clicked', selection.length, row.datasourceType);
|
track('line_does_not_contain', selection.length, row.datasourceType);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -84,8 +84,9 @@ export const PopoverMenu = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
function track(event: string, selectionLength: number, dataSourceType: string | undefined) {
|
function track(action: string, selectionLength: number, dataSourceType: string | undefined) {
|
||||||
reportInteraction(`grafana_explore_logs_${event}`, {
|
reportInteraction(`grafana_explore_logs_popover_menu`, {
|
||||||
|
action,
|
||||||
selection_length: selectionLength,
|
selection_length: selectionLength,
|
||||||
ds_type: dataSourceType || 'unknown',
|
ds_type: dataSourceType || 'unknown',
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user