Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/settings_panels.js')
-rw-r--r--app/assets/javascripts/settings_panels.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/settings_panels.js b/app/assets/javascripts/settings_panels.js
index fe5b21713a2..da948cc85b6 100644
--- a/app/assets/javascripts/settings_panels.js
+++ b/app/assets/javascripts/settings_panels.js
@@ -1,4 +1,5 @@
import $ from 'jquery';
+import { InternalEvents } from '~/tracking';
import { __ } from './locale';
/**
@@ -47,6 +48,15 @@ export function toggleSection($section) {
}
}
+export function initTrackProductAnalyticsExpanded() {
+ const $analyticsSection = $('#js-product-analytics-settings');
+ $analyticsSection.on('click.toggleSection', '.js-settings-toggle', () => {
+ if (isExpanded($analyticsSection)) {
+ InternalEvents.track_event('user_viewed_cluster_configuration');
+ }
+ });
+}
+
export default function initSettingsPanels() {
$('.settings').each((i, elm) => {
const $section = $(elm);
@@ -64,4 +74,6 @@ export default function initSettingsPanels() {
}
}
});
+
+ initTrackProductAnalyticsExpanded();
}