Commit 111fdf24 authored by Mike Greiling's avatar Mike Greiling

Merge branch...

Merge branch '300728-add-tracking-to-the-trial-status-sidebar-widget-experiment-part3' into 'master'

Track when we show the trial status popover

See merge request gitlab-org/gitlab!55810
parents 787eb7ac 1b3042c3
...@@ -4,6 +4,7 @@ import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils'; ...@@ -4,6 +4,7 @@ import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { formatDate } from '~/lib/utils/datetime_utility'; import { formatDate } from '~/lib/utils/datetime_utility';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Tracking from '~/tracking';
const RESIZE_EVENT_DEBOUNCE_MS = 150; const RESIZE_EVENT_DEBOUNCE_MS = 150;
...@@ -76,6 +77,12 @@ export default { ...@@ -76,6 +77,12 @@ export default {
onResize() { onResize() {
this.updateDisabledState(); this.updateDisabledState();
}, },
onShown() {
Tracking.event(undefined, 'popover_shown', {
label: 'trial_status_popover',
property: 'experiment:show_trial_status_in_sidebar',
});
},
updateDisabledState() { updateDisabledState() {
this.disabled = ['xs', 'sm'].includes(bp.getBreakpointSize()); this.disabled = ['xs', 'sm'].includes(bp.getBreakpointSize());
}, },
...@@ -92,6 +99,7 @@ export default { ...@@ -92,6 +99,7 @@ export default {
placement="rightbottom" placement="rightbottom"
boundary="viewport" boundary="viewport"
:delay="{ hide: 400 }" :delay="{ hide: 400 }"
@shown="onShown"
> >
<template #title> <template #title>
{{ $options.i18n.popoverTitle }} {{ $options.i18n.popoverTitle }}
......
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