datatrails: include step index and number of steps when reporting trail step navigation usage (#87068)

* fix: include step index and number of steps
This commit is contained in:
Darren Janeczek 2024-05-02 09:55:58 -04:00 committed by GitHub
parent eae1cafebd
commit b1d98939e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -131,7 +131,7 @@ export class DataTrailHistory extends SceneObjectBase<DataTrailsHistoryState> {
const step = this.state.steps[stepIndex];
const type = step.type === 'metric' && step.trailState.metric === undefined ? 'metric-clear' : step.type;
reportExploreMetrics('history_step_clicked', { type });
reportExploreMetrics('history_step_clicked', { type, step: stepIndex, numberOfSteps: this.state.steps.length });
this.stepTransitionInProgress = true;
this.setState({ currentStep: stepIndex });

View File

@ -64,6 +64,10 @@ type Interactions = {
// The special metric step type that is created when the user de-selects the current metric
| 'metric-clear'
);
// Which step index was clicked on
step: number;
// The total number of steps currently in the trail
numberOfSteps: number;
};
// User clicks on tab to change the action view
metric_action_view_changed: { view: ActionViewType };