2017-12-11 18:48:32 +00:00
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The constant for the event type 'track'.
|
|
|
|
* TODO: keep these constants in a single place. Can we import them from
|
|
|
|
* lib-jitsi-meet's AnalyticsEvents somehow?
|
2021-11-04 21:10:43 +00:00
|
|
|
*
|
2018-01-03 21:24:07 +00:00
|
|
|
* @type {string}
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
const TYPE_TRACK = 'track';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The constant for the event type 'UI' (User Interaction).
|
|
|
|
* TODO: keep these constants in a single place. Can we import them from
|
|
|
|
* lib-jitsi-meet's AnalyticsEvents somehow?
|
2021-11-04 21:10:43 +00:00
|
|
|
*
|
2018-01-03 21:24:07 +00:00
|
|
|
* @type {string}
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
const TYPE_UI = 'ui';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The identifier for the "pinned" action. The local participant has pinned a
|
|
|
|
* participant to remain on large video.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
|
|
|
* @type {String}
|
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
export const ACTION_PINNED = 'pinned';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The identifier for the "unpinned" action. The local participant has unpinned
|
|
|
|
* a participant so the participant doesn't remain permanently on local large
|
|
|
|
* video.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
|
|
|
* @type {String}
|
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
export const ACTION_UNPINNED = 'unpinned';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The identifier for the "pressed" action for shortcut events. This action
|
|
|
|
* means that a button was pressed (and not yet released).
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
|
|
|
* @type {String}
|
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
export const ACTION_SHORTCUT_PRESSED = 'pressed';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The identifier for the "released" action for shortcut events. This action
|
|
|
|
* means that a button which was previously pressed was released.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
|
|
|
* @type {String}
|
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
export const ACTION_SHORTCUT_RELEASED = 'released';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The identifier for the "triggered" action for shortcut events. This action
|
|
|
|
* means that a button was pressed, and we don't care about whether it was
|
|
|
|
* released or will be released in the future.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
|
|
|
* @type {String}
|
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
export const ACTION_SHORTCUT_TRIGGERED = 'triggered';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The name of the keyboard shortcut or toolbar button for muting audio.
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
export const AUDIO_MUTE = 'audio.mute';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* The name of the keyboard shortcut or toolbar button for muting video.
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-01-03 21:24:07 +00:00
|
|
|
export const VIDEO_MUTE = 'video.mute';
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* Creates an event which indicates that a certain action was requested through
|
|
|
|
* the jitsi-meet API.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
2018-01-03 21:24:07 +00:00
|
|
|
* @param {Object} action - The action which was requested through the
|
|
|
|
* jitsi-meet API.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createApiEvent(action, attributes = {}) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action,
|
|
|
|
attributes,
|
|
|
|
source: 'jitsi-meet-api'
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-02-02 14:50:16 +00:00
|
|
|
* Creates an event which indicates that the audio-only mode has been changed.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
2018-02-02 14:50:16 +00:00
|
|
|
* @param {boolean} enabled - True if audio-only is enabled, false otherwise.
|
2018-01-03 21:24:07 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createAudioOnlyChangedEvent(enabled) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
2018-02-02 14:50:16 +00:00
|
|
|
action: `audio.only.${enabled ? 'enabled' : 'disabled'}`
|
2018-01-03 21:24:07 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2017-12-11 18:48:32 +00:00
|
|
|
|
2018-07-02 21:22:51 +00:00
|
|
|
/**
|
|
|
|
* Creates an event for about the JitsiConnection.
|
|
|
|
*
|
|
|
|
* @param {string} action - The action that the event represents.
|
|
|
|
* @param {boolean} attributes - Additional attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createConnectionEvent(action, attributes = {}) {
|
|
|
|
return {
|
|
|
|
action,
|
|
|
|
actionSubject: 'connection',
|
|
|
|
attributes
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-09-01 01:03:35 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates an action occurred in the calendar
|
|
|
|
* integration UI.
|
|
|
|
*
|
|
|
|
* @param {string} eventName - The name of the calendar UI event.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createCalendarClickedEvent(eventName, attributes = {}) {
|
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: eventName,
|
|
|
|
attributes,
|
|
|
|
source: 'calendar',
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event which indicates that the calendar container is shown and
|
|
|
|
* selected.
|
|
|
|
*
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createCalendarSelectedEvent(attributes = {}) {
|
|
|
|
return {
|
|
|
|
action: 'selected',
|
|
|
|
attributes,
|
|
|
|
source: 'calendar',
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event indicating that a calendar has been connected.
|
|
|
|
*
|
|
|
|
* @param {boolean} attributes - Additional attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createCalendarConnectedEvent(attributes = {}) {
|
|
|
|
return {
|
2021-11-09 10:20:40 +00:00
|
|
|
action: 'connected',
|
|
|
|
actionSubject: 'calendar',
|
2018-09-01 01:03:35 +00:00
|
|
|
attributes
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event which indicates an action occurred in the recent list
|
|
|
|
* integration UI.
|
|
|
|
*
|
|
|
|
* @param {string} eventName - The name of the recent list UI event.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createRecentClickedEvent(eventName, attributes = {}) {
|
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: eventName,
|
|
|
|
attributes,
|
|
|
|
source: 'recent.list',
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-02-25 12:41:13 +00:00
|
|
|
/**
|
2021-03-16 15:59:33 +00:00
|
|
|
* Creates an event which indicate an action occurred in the chrome extension banner.
|
2020-02-25 12:41:13 +00:00
|
|
|
*
|
|
|
|
* @param {boolean} installPressed - Whether the user pressed install or `x` - cancel.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createChromeExtensionBannerEvent(installPressed, attributes = {}) {
|
|
|
|
return {
|
|
|
|
action: installPressed ? 'install' : 'cancel',
|
|
|
|
attributes,
|
|
|
|
source: 'chrome.extension.banner',
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-09-01 01:03:35 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates that the recent list container is shown and
|
|
|
|
* selected.
|
|
|
|
*
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createRecentSelectedEvent(attributes = {}) {
|
|
|
|
return {
|
|
|
|
action: 'selected',
|
|
|
|
attributes,
|
|
|
|
source: 'recent.list',
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-04-16 12:44:08 +00:00
|
|
|
/**
|
|
|
|
* Creates an event for an action on the deep linking page.
|
|
|
|
*
|
|
|
|
* @param {string} action - The action that the event represents.
|
|
|
|
* @param {string} actionSubject - The subject that was acted upon.
|
|
|
|
* @param {boolean} attributes - Additional attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createDeepLinkingPageEvent(
|
|
|
|
action, actionSubject, attributes = {}) {
|
|
|
|
return {
|
|
|
|
action,
|
|
|
|
actionSubject,
|
|
|
|
source: 'deepLinkingPage',
|
|
|
|
attributes
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-12-11 18:48:32 +00:00
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* Creates an event which indicates that a device was changed.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
2018-01-03 21:24:07 +00:00
|
|
|
* @param {string} mediaType - The media type of the device ('audio' or
|
|
|
|
* 'video').
|
|
|
|
* @param {string} deviceType - The type of the device ('input' or 'output').
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createDeviceChangedEvent(mediaType, deviceType) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action: 'device.changed',
|
|
|
|
attributes: {
|
|
|
|
'device_type': deviceType,
|
|
|
|
'media_type': mediaType
|
|
|
|
}
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2017-12-11 18:48:32 +00:00
|
|
|
|
2020-04-16 11:26:44 +00:00
|
|
|
/**
|
|
|
|
* Creates an event indicating that an action related to E2EE occurred.
|
|
|
|
*
|
|
|
|
* @param {string} action - The action which occurred.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createE2EEEvent(action) {
|
|
|
|
return {
|
|
|
|
action,
|
|
|
|
actionSubject: 'e2ee'
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-12-11 18:48:32 +00:00
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* Creates an event which specifies that the feedback dialog has been opened.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
2018-01-03 21:24:07 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createFeedbackOpenEvent() {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action: 'feedback.opened'
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2017-12-11 18:48:32 +00:00
|
|
|
|
|
|
|
/**
|
2018-03-23 00:53:16 +00:00
|
|
|
* Creates an event for an action regarding the AddPeopleDialog (invites).
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
2018-03-23 00:53:16 +00:00
|
|
|
* @param {string} action - The action that the event represents.
|
|
|
|
* @param {string} actionSubject - The subject that was acted upon.
|
|
|
|
* @param {boolean} attributes - Additional attributes to attach to the event.
|
2018-01-03 21:24:07 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-03-23 00:53:16 +00:00
|
|
|
export function createInviteDialogEvent(
|
|
|
|
action, actionSubject, attributes = {}) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
2018-03-23 00:53:16 +00:00
|
|
|
action,
|
|
|
|
actionSubject,
|
|
|
|
attributes,
|
|
|
|
source: 'inviteDialog'
|
2018-01-03 21:24:07 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2017-12-11 18:48:32 +00:00
|
|
|
|
2019-08-22 15:08:34 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which reports about the current network information reported by the operating system.
|
|
|
|
*
|
|
|
|
* @param {boolean} isOnline - Tells whether or not the internet is reachable.
|
|
|
|
* @param {string} [networkType] - Network type, see {@code NetworkInfo} type defined by the 'base/net-info' feature.
|
|
|
|
* @param {Object} [details] - Extra info, see {@code NetworkInfo} type defined by the 'base/net-info' feature.
|
|
|
|
* @returns {Object}
|
|
|
|
*/
|
|
|
|
export function createNetworkInfoEvent({ isOnline, networkType, details }) {
|
|
|
|
const attributes = { isOnline };
|
|
|
|
|
|
|
|
// Do no include optional stuff or Amplitude handler will log warnings.
|
|
|
|
networkType && (attributes.networkType = networkType);
|
|
|
|
details && (attributes.details = details);
|
|
|
|
|
|
|
|
return {
|
|
|
|
action: 'network.info',
|
|
|
|
attributes
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-06-17 10:35:47 +00:00
|
|
|
/**
|
|
|
|
* Creates an "offer/answer failure" event.
|
|
|
|
*
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createOfferAnswerFailedEvent() {
|
|
|
|
return {
|
|
|
|
action: 'offer.answer.failure'
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-12-11 18:48:32 +00:00
|
|
|
/**
|
2018-01-03 21:24:07 +00:00
|
|
|
* Creates a "page reload" event.
|
2017-12-11 18:48:32 +00:00
|
|
|
*
|
2018-01-03 21:24:07 +00:00
|
|
|
* @param {string} reason - The reason for the reload.
|
|
|
|
* @param {number} timeout - The timeout in seconds after which the page is
|
|
|
|
* scheduled to reload.
|
2018-02-06 22:54:21 +00:00
|
|
|
* @param {Object} details - The details for the error.
|
2018-01-03 21:24:07 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
2017-12-11 18:48:32 +00:00
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createPageReloadScheduledEvent(reason, timeout, details) {
|
|
|
|
return {
|
|
|
|
action: 'page.reload.scheduled',
|
|
|
|
attributes: {
|
|
|
|
reason,
|
|
|
|
timeout,
|
|
|
|
...details
|
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a "pinned" or "unpinned" event.
|
|
|
|
*
|
|
|
|
* @param {string} action - The action ("pinned" or "unpinned").
|
|
|
|
* @param {string} participantId - The ID of the participant which was pinned.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createPinnedEvent(action, participantId, attributes) {
|
|
|
|
return {
|
|
|
|
type: TYPE_TRACK,
|
|
|
|
action,
|
|
|
|
actionSubject: 'participant',
|
|
|
|
objectType: 'participant',
|
|
|
|
objectId: participantId,
|
|
|
|
attributes
|
|
|
|
};
|
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
2021-10-13 07:47:55 +00:00
|
|
|
/**
|
|
|
|
* Creates a poll event.
|
|
|
|
* The following events will be created:
|
|
|
|
* - poll.created
|
|
|
|
* - poll.vote.checked
|
|
|
|
* - poll.vote.sent
|
|
|
|
* - poll.vote.skipped
|
|
|
|
* - poll.vote.detailsViewed
|
|
|
|
* - poll.vote.changed
|
|
|
|
* - poll.option.added
|
|
|
|
* - poll.option.moved
|
|
|
|
* - poll.option.removed.
|
|
|
|
*
|
|
|
|
* @param {string} action - The action.
|
|
|
|
* @returns {Object}
|
|
|
|
*/
|
|
|
|
export function createPollEvent(action) {
|
|
|
|
return {
|
|
|
|
action: `poll.${action}`
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-01-03 21:24:07 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates that a button in the profile panel was
|
|
|
|
* clicked.
|
|
|
|
*
|
|
|
|
* @param {string} buttonName - The name of the button.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createProfilePanelButtonEvent(buttonName, attributes = {}) {
|
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: buttonName,
|
|
|
|
attributes,
|
|
|
|
source: 'profile.panel',
|
|
|
|
type: TYPE_UI
|
2018-01-03 21:24:07 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event which indicates that a specific button on one of the
|
|
|
|
* recording-related dialogs was clicked.
|
|
|
|
*
|
|
|
|
* @param {string} dialogName - The name of the dialog (e.g. 'start' or 'stop').
|
|
|
|
* @param {string} buttonName - The name of the button (e.g. 'confirm' or
|
|
|
|
* 'cancel').
|
2019-03-11 16:17:21 +00:00
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
2018-01-03 21:24:07 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2019-03-11 16:17:21 +00:00
|
|
|
export function createRecordingDialogEvent(
|
|
|
|
dialogName, buttonName, attributes = {}) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: buttonName,
|
2019-03-11 16:17:21 +00:00
|
|
|
attributes,
|
2018-01-03 21:24:07 +00:00
|
|
|
source: `${dialogName}.recording.dialog`,
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
2019-03-11 16:17:21 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates that a specific button on one of the
|
|
|
|
* liveStreaming-related dialogs was clicked.
|
|
|
|
*
|
|
|
|
* @param {string} dialogName - The name of the dialog (e.g. 'start' or 'stop').
|
|
|
|
* @param {string} buttonName - The name of the button (e.g. 'confirm' or
|
|
|
|
* 'cancel').
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createLiveStreamingDialogEvent(dialogName, buttonName) {
|
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: buttonName,
|
|
|
|
source: `${dialogName}.liveStreaming.dialog`,
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-05-21 10:32:20 +00:00
|
|
|
/**
|
|
|
|
* Creates an event with the local tracks duration.
|
|
|
|
*
|
|
|
|
* @param {Object} duration - The object with the duration of the local tracks.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createLocalTracksDurationEvent(duration) {
|
|
|
|
const { audio, video, conference } = duration;
|
|
|
|
const { camera, desktop } = video;
|
|
|
|
|
|
|
|
return {
|
|
|
|
action: 'local.tracks.durations',
|
|
|
|
attributes: {
|
|
|
|
audio: audio.value,
|
|
|
|
camera: camera.value,
|
|
|
|
conference: conference.value,
|
|
|
|
desktop: desktop.value
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-09-10 15:39:33 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates that an action related to recording has
|
2021-03-16 15:59:33 +00:00
|
|
|
* occurred.
|
2018-09-10 15:39:33 +00:00
|
|
|
*
|
|
|
|
* @param {string} action - The action (e.g. 'start' or 'stop').
|
|
|
|
* @param {string} type - The recording type (e.g. 'file' or 'live').
|
|
|
|
* @param {number} value - The duration of the recording in seconds (for stop
|
|
|
|
* action).
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createRecordingEvent(action, type, value) {
|
|
|
|
return {
|
|
|
|
action,
|
|
|
|
actionSubject: `recording.${type}`,
|
|
|
|
attributes: {
|
|
|
|
value
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-07-25 11:23:48 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates that the same conference has been rejoined.
|
|
|
|
*
|
|
|
|
* @param {string} url - The full conference URL.
|
|
|
|
* @param {number} lastConferenceDuration - How many seconds user stayed in the previous conference.
|
|
|
|
* @param {number} timeSinceLeft - How many seconds since the last conference was left.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createRejoinedEvent({ url, lastConferenceDuration, timeSinceLeft }) {
|
|
|
|
return {
|
|
|
|
action: 'rejoined',
|
|
|
|
attributes: {
|
|
|
|
lastConferenceDuration,
|
|
|
|
timeSinceLeft,
|
|
|
|
url
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-01-03 21:24:07 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which specifies that the "confirm" button on the remote
|
|
|
|
* mute dialog has been clicked.
|
|
|
|
*
|
|
|
|
* @param {string} participantId - The ID of the participant that was remotely
|
|
|
|
* muted.
|
2021-02-24 21:45:07 +00:00
|
|
|
* @param {string} mediaType - The media type of the channel to mute.
|
2018-01-03 21:24:07 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2021-02-24 21:45:07 +00:00
|
|
|
export function createRemoteMuteConfirmedEvent(participantId, mediaType) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
attributes: {
|
2021-02-24 21:45:07 +00:00
|
|
|
'participant_id': participantId,
|
|
|
|
'media_type': mediaType
|
2018-01-03 21:24:07 +00:00
|
|
|
},
|
2021-11-09 10:20:40 +00:00
|
|
|
source: 'remote.mute.button',
|
2018-01-03 21:24:07 +00:00
|
|
|
type: TYPE_UI
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event which indicates that one of the buttons in the "remote
|
|
|
|
* video menu" was clicked.
|
|
|
|
*
|
|
|
|
* @param {string} buttonName - The name of the button.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createRemoteVideoMenuButtonEvent(buttonName, attributes) {
|
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: buttonName,
|
|
|
|
attributes,
|
|
|
|
source: 'remote.video.menu',
|
|
|
|
type: TYPE_UI
|
2018-01-03 21:24:07 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
2020-07-15 15:22:00 +00:00
|
|
|
/**
|
|
|
|
* The rtcstats websocket onclose event. We send this to amplitude in order
|
|
|
|
* to detect trace ws prematurely closing.
|
|
|
|
*
|
|
|
|
* @param {Object} closeEvent - The event with which the websocket closed.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createRTCStatsTraceCloseEvent(closeEvent) {
|
|
|
|
const event = {
|
|
|
|
action: 'trace.onclose',
|
|
|
|
source: 'rtcstats'
|
|
|
|
};
|
|
|
|
|
|
|
|
event.code = closeEvent.code;
|
|
|
|
event.reason = closeEvent.reason;
|
|
|
|
|
|
|
|
return event;
|
|
|
|
}
|
|
|
|
|
2018-01-03 21:24:07 +00:00
|
|
|
/**
|
|
|
|
* Creates an event indicating that an action related to screen sharing
|
2018-11-08 12:25:02 +00:00
|
|
|
* occurred (e.g. It was started or stopped).
|
2018-01-03 21:24:07 +00:00
|
|
|
*
|
|
|
|
* @param {string} action - The action which occurred.
|
2021-10-14 10:17:56 +00:00
|
|
|
* @param {number?} value - The screenshare duration in seconds.
|
2018-01-03 21:24:07 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2021-10-14 10:17:56 +00:00
|
|
|
export function createScreenSharingEvent(action, value = null) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action,
|
2021-10-14 10:17:56 +00:00
|
|
|
actionSubject: 'screen.sharing',
|
|
|
|
attributes: {
|
|
|
|
value
|
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
2020-12-18 20:42:39 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates the screen sharing video is not displayed when it needs to be displayed.
|
|
|
|
*
|
|
|
|
* @param {Object} attributes - Additional information that describes the issue.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createScreenSharingIssueEvent(attributes) {
|
|
|
|
return {
|
|
|
|
action: 'screen.sharing.issue',
|
|
|
|
attributes
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-01-03 21:24:07 +00:00
|
|
|
/**
|
|
|
|
* Creates an event associated with the "shared video" feature.
|
|
|
|
*
|
|
|
|
* @param {string} action - The action that the event represents.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createSharedVideoEvent(action, attributes = {}) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action,
|
|
|
|
attributes,
|
|
|
|
actionSubject: 'shared.video'
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event associated with a shortcut being pressed, released or
|
|
|
|
* triggered. By convention, where appropriate an attribute named 'enable'
|
|
|
|
* should be used to indicate the action which resulted by the shortcut being
|
2018-11-08 12:25:02 +00:00
|
|
|
* pressed (e.g. Whether screen sharing was enabled or disabled).
|
2018-01-03 21:24:07 +00:00
|
|
|
*
|
|
|
|
* @param {string} shortcut - The identifier of the shortcut which produced
|
|
|
|
* an action.
|
|
|
|
* @param {string} action - The action that the event represents (one
|
|
|
|
* of ACTION_SHORTCUT_PRESSED, ACTION_SHORTCUT_RELEASED
|
|
|
|
* or ACTION_SHORTCUT_TRIGGERED).
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
2022-05-06 10:14:10 +00:00
|
|
|
* @param {string} source - The event's source.
|
2018-01-03 21:24:07 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createShortcutEvent(
|
|
|
|
shortcut,
|
|
|
|
action = ACTION_SHORTCUT_TRIGGERED,
|
2022-05-06 10:14:10 +00:00
|
|
|
attributes = {},
|
|
|
|
source = 'keyboard.shortcut') {
|
2018-02-26 16:14:46 +00:00
|
|
|
return {
|
|
|
|
action,
|
|
|
|
actionSubjectId: shortcut,
|
|
|
|
attributes,
|
2022-05-06 10:14:10 +00:00
|
|
|
source,
|
2018-02-26 16:14:46 +00:00
|
|
|
type: TYPE_UI
|
2018-01-03 21:24:07 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event which indicates the "start audio only" configuration.
|
|
|
|
*
|
|
|
|
* @param {boolean} audioOnly - Whether "start audio only" is enabled or not.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createStartAudioOnlyEvent(audioOnly) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action: 'start.audio.only',
|
|
|
|
attributes: {
|
|
|
|
enabled: audioOnly
|
|
|
|
}
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
2019-06-14 11:16:08 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates the "start silent" configuration.
|
|
|
|
*
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createStartSilentEvent() {
|
|
|
|
return {
|
|
|
|
action: 'start.silent'
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-05-24 21:59:10 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates that HTMLAudioElement.play has failed.
|
|
|
|
*
|
2022-07-14 07:10:08 +00:00
|
|
|
* @param {string} elementID - The ID of the HTMLAudioElement.
|
2021-05-24 21:59:10 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createAudioPlayErrorEvent(elementID) {
|
|
|
|
return {
|
|
|
|
action: 'audio.play.error',
|
|
|
|
attributes: {
|
|
|
|
elementID
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-07-14 07:10:08 +00:00
|
|
|
* Creates an event which indicates that HTMLAudioElement.play has succeeded after a prior failure.
|
2021-05-24 21:59:10 +00:00
|
|
|
*
|
2022-07-14 07:10:08 +00:00
|
|
|
* @param {string} elementID - The ID of the HTMLAudioElement.
|
2021-05-24 21:59:10 +00:00
|
|
|
* @returns {Object} The event in a format suitable for sending via sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createAudioPlaySuccessEvent(elementID) {
|
|
|
|
return {
|
|
|
|
action: 'audio.play.success',
|
|
|
|
attributes: {
|
|
|
|
elementID
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-01-03 21:24:07 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates the "start muted" configuration.
|
|
|
|
*
|
|
|
|
* @param {string} source - The source of the configuration, 'local' or
|
|
|
|
* 'remote' depending on whether it comes from the static configuration (i.e.
|
2018-11-08 12:25:02 +00:00
|
|
|
* {@code config.js}) or comes dynamically from Jicofo.
|
2018-01-03 21:24:07 +00:00
|
|
|
* @param {boolean} audioMute - Whether the configuration requests that audio
|
|
|
|
* is muted.
|
|
|
|
* @param {boolean} videoMute - Whether the configuration requests that video
|
|
|
|
* is muted.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createStartMutedConfigurationEvent(
|
|
|
|
source,
|
|
|
|
audioMute,
|
|
|
|
videoMute) {
|
|
|
|
return {
|
|
|
|
action: 'start.muted.configuration',
|
|
|
|
attributes: {
|
|
|
|
source,
|
|
|
|
'audio_mute': audioMute,
|
|
|
|
'video_mute': videoMute
|
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
2017-12-11 18:48:32 +00:00
|
|
|
/**
|
|
|
|
* Automatically changing the mute state of a media track in order to match
|
|
|
|
* the current stored state in redux.
|
|
|
|
*
|
2018-01-03 21:24:07 +00:00
|
|
|
* @param {string} mediaType - The track's media type ('audio' or 'video').
|
|
|
|
* @param {boolean} muted - Whether the track is being muted or unmuted as
|
|
|
|
* as result of the sync operation.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createSyncTrackStateEvent(mediaType, muted) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action: 'sync.track.state',
|
|
|
|
attributes: {
|
|
|
|
'media_type': mediaType,
|
|
|
|
muted
|
|
|
|
}
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event associated with a toolbar button being clicked/pressed. By
|
|
|
|
* convention, where appropriate an attribute named 'enable' should be used to
|
|
|
|
* indicate the action which resulted by the shortcut being pressed (e.g.
|
2018-11-08 12:25:02 +00:00
|
|
|
* Whether screen sharing was enabled or disabled).
|
2018-01-03 21:24:07 +00:00
|
|
|
*
|
|
|
|
* @param {string} buttonName - The identifier of the toolbar button which was
|
|
|
|
* clicked/pressed.
|
|
|
|
* @param {Object} attributes - Attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createToolbarEvent(buttonName, attributes = {}) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: buttonName,
|
|
|
|
attributes,
|
|
|
|
source: 'toolbar.button',
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-01-03 21:24:07 +00:00
|
|
|
|
2021-07-20 11:31:49 +00:00
|
|
|
/**
|
|
|
|
* Creates an event associated with a reaction button being clicked/pressed.
|
|
|
|
*
|
|
|
|
* @param {string} buttonName - The identifier of the reaction button which was
|
|
|
|
* clicked/pressed.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createReactionMenuEvent(buttonName) {
|
2021-11-09 10:20:40 +00:00
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: 'button',
|
|
|
|
source: 'reaction',
|
|
|
|
buttonName,
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
2021-10-25 08:31:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event associated with disabling of reaction sounds.
|
|
|
|
*
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createReactionSoundsDisabledEvent() {
|
2021-11-09 10:20:40 +00:00
|
|
|
return {
|
|
|
|
action: 'disabled',
|
|
|
|
actionSubject: 'sounds',
|
|
|
|
source: 'reaction.settings',
|
|
|
|
type: TYPE_UI
|
|
|
|
};
|
2021-07-20 11:31:49 +00:00
|
|
|
}
|
|
|
|
|
2018-01-03 21:24:07 +00:00
|
|
|
/**
|
|
|
|
* Creates an event which indicates that a local track was muted.
|
|
|
|
*
|
|
|
|
* @param {string} mediaType - The track's media type ('audio' or 'video').
|
2018-11-08 12:25:02 +00:00
|
|
|
* @param {string} reason - The reason the track was muted (e.g. It was
|
2018-01-03 21:24:07 +00:00
|
|
|
* triggered by the "initial mute" option, or a previously muted track was
|
2018-11-08 12:25:02 +00:00
|
|
|
* replaced (e.g. When a new device was used)).
|
2018-01-03 21:24:07 +00:00
|
|
|
* @param {boolean} muted - Whether the track was muted or unmuted.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createTrackMutedEvent(mediaType, reason, muted = true) {
|
2018-01-03 21:24:07 +00:00
|
|
|
return {
|
|
|
|
action: 'track.muted',
|
|
|
|
attributes: {
|
|
|
|
'media_type': mediaType,
|
|
|
|
muted,
|
|
|
|
reason
|
|
|
|
}
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2018-02-26 21:37:27 +00:00
|
|
|
|
2020-10-29 12:30:57 +00:00
|
|
|
/**
|
|
|
|
* Creates an event for joining a vpaas conference.
|
|
|
|
*
|
|
|
|
* @param {string} tenant - The conference tenant.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createVpaasConferenceJoinedEvent(tenant) {
|
|
|
|
return {
|
|
|
|
action: 'vpaas.conference.joined',
|
|
|
|
attributes: {
|
|
|
|
tenant
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-02-26 21:37:27 +00:00
|
|
|
/**
|
|
|
|
* Creates an event for an action on the welcome page.
|
|
|
|
*
|
|
|
|
* @param {string} action - The action that the event represents.
|
|
|
|
* @param {string} actionSubject - The subject that was acted upon.
|
|
|
|
* @param {boolean} attributes - Additional attributes to attach to the event.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
2018-02-26 16:14:46 +00:00
|
|
|
export function createWelcomePageEvent(action, actionSubject, attributes = {}) {
|
|
|
|
return {
|
|
|
|
action,
|
|
|
|
actionSubject,
|
|
|
|
attributes,
|
|
|
|
source: 'welcomePage'
|
2018-02-26 21:37:27 +00:00
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
2021-07-26 11:38:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event which indicates a screenshot of the screensharing has been taken.
|
|
|
|
*
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createScreensharingCaptureTakenEvent() {
|
|
|
|
return {
|
2021-11-09 10:20:40 +00:00
|
|
|
action: 'screen.sharing.capture.taken'
|
2021-07-26 11:38:56 +00:00
|
|
|
};
|
|
|
|
}
|
2021-11-23 13:14:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an event for an action on breakout rooms.
|
|
|
|
*
|
|
|
|
* @param {string} actionSubject - The subject that was acted upon.
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createBreakoutRoomsEvent(actionSubject) {
|
|
|
|
return {
|
|
|
|
action: 'clicked',
|
|
|
|
actionSubject: `${actionSubject}.button`,
|
|
|
|
source: 'breakout.rooms'
|
|
|
|
};
|
|
|
|
}
|
2022-03-11 13:00:49 +00:00
|
|
|
|
|
|
|
/**
|
2022-05-06 10:14:10 +00:00
|
|
|
* Creates an event which indicates a GIF was sent.
|
2022-03-11 13:00:49 +00:00
|
|
|
*
|
|
|
|
* @returns {Object} The event in a format suitable for sending via
|
|
|
|
* sendAnalytics.
|
|
|
|
*/
|
|
|
|
export function createGifSentEvent() {
|
|
|
|
return {
|
|
|
|
action: 'gif.sent'
|
|
|
|
};
|
|
|
|
}
|