Commit 5d9b522f authored by Phil Hughes's avatar Phil Hughes

Adds tracking to create file button in widget

Adds Redis HLL tracking to the nothing to merge widget
states create file button.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/343126
parent 3b744058
<script>
import { GlButton, GlSprintf, GlLink, GlSafeHtmlDirective } from '@gitlab/ui';
import emptyStateSVG from 'icons/_mr_widget_empty_state.svg';
import api from '~/api';
import { helpPagePath } from '~/helpers/help_page_helper';
export default {
......@@ -22,6 +23,11 @@ export default {
data() {
return { emptyStateSVG };
},
methods: {
onClickNewFile() {
api.trackRedisHllUserEvent('i_code_review_widget_nothing_merge_click_new_file');
},
},
ciHelpPage: helpPagePath('/ci/quick_start/index.html'),
safeHtmlConfig: { ADD_TAGS: ['use'] },
};
......@@ -59,6 +65,7 @@ export default {
category="secondary"
variant="success"
data-testid="createFileButton"
@click="onClickNewFile"
>
{{ __('Create file') }}
</gl-button>
......
......@@ -67,6 +67,7 @@
- 'i_code_review_user_resolve_conflict'
- 'i_code_review_user_searches_diff'
- 'i_code_review_user_resolve_thread_in_issue'
- 'i_code_review_widget_nothing_merge_click_new_file'
- name: code_review_category_monthly_active_users
operator: OR
source: redis
......@@ -126,6 +127,7 @@
- 'i_code_review_user_resolve_conflict'
- 'i_code_review_user_searches_diff'
- 'i_code_review_user_resolve_thread_in_issue'
- 'i_code_review_widget_nothing_merge_click_new_file'
- name: code_review_extension_category_monthly_active_users
operator: OR
source: redis
......
---
key_path: redis_hll_counters.code_review.i_code_review_widget_nothing_merge_click_new_file_monthly
description: Count of users who click the create file button in the nothing to merge widget state
product_section: dev
product_stage: create
product_group: group::code review
product_category: code_review
value_type: number
status: active
milestone: '14.5'
introduced_by_url:
time_frame: 28d
data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- i_code_review_widget_nothing_merge_click_new_file
data_category: optional
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
---
key_path: redis_hll_counters.code_review.i_code_review_widget_nothing_merge_click_new_file_weekly
description: Count of users who click the create file button in the nothing to merge widget state
product_section: dev
product_stage: create
product_group: group::code review
product_category: code_review
value_type: number
status: active
milestone: '14.5'
introduced_by_url:
time_frame: 7d
data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- i_code_review_widget_nothing_merge_click_new_file
data_category: optional
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
......@@ -249,3 +249,7 @@
redis_slot: code_review
category: code_review
aggregation: weekly
- name: i_code_review_widget_nothing_merge_click_new_file
redis_slot: code_review
category: code_review
aggregation: weekly
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