Skip to content
Snippets Groups Projects
Unverified Commit 6b683a0f authored by Nemanja's avatar Nemanja
Browse files

Remove click actions trackers

parent 3ea832f2
Branches
Tags
No related merge requests found
......@@ -2,7 +2,6 @@ import { Component } from "react";
import { connect } from "react-redux";
import type * as tippy from "tippy.js";
import * as MetabaseAnalytics from "metabase/lib/analytics";
import { getEventTarget } from "metabase/lib/dom";
import { performAction } from "metabase/visualizations/lib/action";
import type {
......@@ -11,16 +10,12 @@ import type {
PopoverClickAction,
OnChangeCardAndRun,
} from "metabase/visualizations/types";
import {
isPopoverClickAction,
isRegularClickAction,
} from "metabase/visualizations/types";
import { isPopoverClickAction } from "metabase/visualizations/types";
import type { Series } from "metabase-types/api";
import type { Dispatch } from "metabase-types/store";
import { FlexTippyPopover } from "./ClickActionsPopover.styled";
import { ClickActionsView } from "./ClickActionsView";
import { getGALabelForAction } from "./utils";
interface ChartClickActionsProps {
clicked: ClickObject;
......@@ -56,11 +51,6 @@ export class ClickActionsPopover extends Component<
handleClickAction = (action: RegularClickAction) => {
const { dispatch, onChangeCardAndRun } = this.props;
if (isPopoverClickAction(action)) {
MetabaseAnalytics.trackStructEvent(
"Actions",
"Open Click Action Popover",
getGALabelForAction(action),
);
this.setState({ popoverAction: action });
} else {
const didPerform = performAction(action, {
......@@ -68,14 +58,6 @@ export class ClickActionsPopover extends Component<
onChangeCardAndRun,
});
if (didPerform) {
if (isRegularClickAction(action)) {
MetabaseAnalytics.trackStructEvent(
"Actions",
"Executed Click Action",
getGALabelForAction(action),
);
}
this.close();
} else {
console.warn("No action performed", action);
......@@ -121,21 +103,9 @@ export class ClickActionsPopover extends Component<
this.instance?.popperInstance?.update();
}}
onChangeCardAndRun={({ nextCard }) => {
if (popoverAction) {
MetabaseAnalytics.trackStructEvent(
"Action",
"Executed Click Action",
getGALabelForAction(popoverAction),
);
}
onChangeCardAndRun({ nextCard });
}}
onClose={() => {
MetabaseAnalytics.trackStructEvent(
"Action",
"Dismissed Click Action Menu",
getGALabelForAction(popoverAction),
);
this.close();
}}
series={series}
......@@ -154,10 +124,6 @@ export class ClickActionsPopover extends Component<
this.instance = instance;
}}
onClose={() => {
MetabaseAnalytics.trackStructEvent(
"Action",
"Dismissed Click Action Menu",
);
this.close();
}}
placement="bottom-start"
......
......@@ -62,9 +62,6 @@ export const getGroupedAndSortedActions = (
.value();
};
export const getGALabelForAction = (action: RegularClickAction) =>
action ? `${action.section || ""}:${action.name || ""}` : null;
export const getSectionTitle = (
sectionKey: string,
actions: RegularClickAction[],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment