diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-06 18:09:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-06 18:09:58 +0300 |
commit | 6d3676d61064af469f2fa1171bec4575235c6739 (patch) | |
tree | 80264790b844a7bdc60ad78d6a91580387194711 /app/assets/javascripts/tracking | |
parent | 30acb0522a609c438d60f5345243e96f9a041ae6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/tracking')
-rw-r--r-- | app/assets/javascripts/tracking/internal_events.js | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/app/assets/javascripts/tracking/internal_events.js b/app/assets/javascripts/tracking/internal_events.js index a69f192f520..56453373bbf 100644 --- a/app/assets/javascripts/tracking/internal_events.js +++ b/app/assets/javascripts/tracking/internal_events.js @@ -5,28 +5,30 @@ import { GITLAB_INTERNAL_EVENT_CATEGORY, SERVICE_PING_SCHEMA } from './constants const InternalEvents = { /** + * + * @param {string} event + */ + track_event(event) { + API.trackRedisHllUserEvent(event); + Tracking.event(GITLAB_INTERNAL_EVENT_CATEGORY, event, { + context: { + schema: SERVICE_PING_SCHEMA, + data: { + event_name: event, + data_source: 'redis_hll', + }, + }, + }); + }, + /** * Returns an implementation of this class in the form of * a Vue mixin. - * - * @param {Object} opts - default options for all events - * @returns {Object} */ - mixin(opts = {}) { + mixin() { return { - mixins: [Tracking.mixin(opts)], methods: { track_event(event) { - API.trackRedisHllUserEvent(event); - this.track(event, { - context: { - schema: SERVICE_PING_SCHEMA, - data: { - event_name: event, - data_source: 'redis_hll', - }, - }, - category: GITLAB_INTERNAL_EVENT_CATEGORY, - }); + InternalEvents.track_event(event); }, }, }; |