Commit e33faf0a authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'refactor-metrics-constants' into 'master'

Refactor metric constant name

See merge request gitlab-org/gitlab!81603
parents 5be9351d 11e99e53
export const TRACK_TOGGLE_TRAINING_PROVIDER_ACTION = 'toggle_security_training_provider';
export const TRACK_TOGGLE_TRAINING_PROVIDER_LABEL = 'update_security_training_provider';
export const TRACK_CLICK_TRAINING_LINK = 'click_security_training_link';
export const TRACK_CLICK_TRAINING_LINK_ACTION = 'click_security_training_link';
export const TRACK_PROVIDER_LEARN_MORE_CLICK_ACTION = 'click_link';
export const TRACK_PROVIDER_LEARN_MORE_CLICK_LABEL = 'security_training_provider';
export const TRACK_TRAINING_LOADED_ACTION = 'security_training_link_loaded';
......@@ -7,7 +7,7 @@ import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import axios from '~/lib/utils/axios_utils';
import Tracking from '~/tracking';
import {
TRACK_CLICK_TRAINING_LINK,
TRACK_CLICK_TRAINING_LINK_ACTION,
TRACK_TRAINING_LOADED_ACTION,
} from '~/security_configuration/constants';
import { SUPPORTED_IDENTIFIER_TYPES } from '../constants';
......@@ -127,7 +127,7 @@ export default {
}
},
clickTrainingLink() {
this.triggerMetric(TRACK_CLICK_TRAINING_LINK);
this.triggerMetric(TRACK_CLICK_TRAINING_LINK_ACTION);
},
triggerMetric(action) {
const { name } = this.supportedIdentifier;
......
......@@ -15,7 +15,7 @@ import securityTrainingProvidersQuery from '~/security_configuration/graphql/sec
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { SUPPORTED_IDENTIFIER_TYPES } from 'ee/vulnerabilities/constants';
import {
TRACK_CLICK_TRAINING_LINK,
TRACK_CLICK_TRAINING_LINK_ACTION,
TRACK_TRAINING_LOADED_ACTION,
} from '~/security_configuration/constants';
import createMockApollo from 'helpers/mock_apollo_helper';
......@@ -236,7 +236,7 @@ describe('VulnerabilityTraining component', () => {
expect(trackingSpy).toHaveBeenCalledWith(
undefined,
TRACK_CLICK_TRAINING_LINK,
TRACK_CLICK_TRAINING_LINK_ACTION,
expectedTrackingOptions,
);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment