Commit 1b3042c3 authored by Dallas Reedy's avatar Dallas Reedy

Track when the popover is shown

parent d8a891a9
...@@ -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