summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/notes/utils.js')
-rw-r--r--app/assets/javascripts/notes/utils.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/utils.js b/app/assets/javascripts/notes/utils.js
new file mode 100644
index 00000000000..e6c2eb06a51
--- /dev/null
+++ b/app/assets/javascripts/notes/utils.js
@@ -0,0 +1,12 @@
+/* eslint-disable @gitlab/require-i18n-strings */
+
+/**
+ * Tracks snowplow event when User toggles timeline view
+ * @param {Boolean} enabled that will be send as a property for the event
+ */
+export const trackToggleTimelineView = enabled => ({
+ category: 'Incident Management',
+ action: 'toggle_incident_comments_into_timeline_view',
+ label: 'Status',
+ property: enabled,
+});