blob: 2628054ae5f6314c400672cba11346b0aebb519d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import Tracking from '~/tracking';
export const EDITOR_TRACKING_LABEL = 'editor_tracking';
export const EDITOR_TYPE_ACTION = 'editor_type_used';
export const EDITOR_TYPE_PLAIN_TEXT_EDITOR = 'editor_type_plain_text_editor';
export const EDITOR_TYPE_RICH_TEXT_EDITOR = 'editor_type_rich_text_editor';
export const trackSavedUsingEditor = (isRichText, context) => {
Tracking.event(undefined, EDITOR_TYPE_ACTION, {
label: EDITOR_TRACKING_LABEL,
editorType: isRichText ? EDITOR_TYPE_RICH_TEXT_EDITOR : EDITOR_TYPE_PLAIN_TEXT_EDITOR,
context,
});
};
|