diff --git a/app/src/components/integrations/containers/integrationInfoContainer/instancesSection/instancesSection.jsx b/app/src/components/integrations/containers/integrationInfoContainer/instancesSection/instancesSection.jsx index 48b8c65d6c..1e7f19df55 100644 --- a/app/src/components/integrations/containers/integrationInfoContainer/instancesSection/instancesSection.jsx +++ b/app/src/components/integrations/containers/integrationInfoContainer/instancesSection/instancesSection.jsx @@ -226,7 +226,7 @@ export class InstancesSection extends Component { cancelText: formatMessage(COMMON_LOCALE_KEYS.CANCEL), dangerConfirm: true, eventsInfo: { - confirmBtn: PLUGINS_PAGE_EVENTS.OK_BTN_UNINSTALL_PLUGIN_MODAL, + confirmBtn: PLUGINS_PAGE_EVENTS.clickConfirmUninstallPlugin(instanceType), closeIcon: PLUGINS_PAGE_EVENTS.CLOSE_ICON_UNINSTALL_PLUGIN_MODAL, cancelBtn: PLUGINS_PAGE_EVENTS.CANCEL_BTN_UNINSTALL_PLUGIN_MODAL, }, diff --git a/app/src/components/main/analytics/events/logPageEvents.js b/app/src/components/main/analytics/events/logPageEvents.js index ed766a708e..cad43da898 100644 --- a/app/src/components/main/analytics/events/logPageEvents.js +++ b/app/src/components/main/analytics/events/logPageEvents.js @@ -145,6 +145,11 @@ export const LOG_PAGE_EVENTS = { icon_name: `${viewMode}_mode`, status: isActive ? 'on' : 'off', }), + getClickOnLogMicrosecondPrecisionEvent: (isActive) => ({ + ...basicLogPageClickEventParameters, + element_name: 'microseconds', + switcher: isActive ? 'on' : 'off', + }), CLICK_JUMP_TO_ERROR_LOG: { ...basicLogPageClickEventParameters, place: 'stack_trace', diff --git a/app/src/components/main/analytics/events/pluginsPageEvents.js b/app/src/components/main/analytics/events/pluginsPageEvents.js index 4b561b1289..2f80f70343 100644 --- a/app/src/components/main/analytics/events/pluginsPageEvents.js +++ b/app/src/components/main/analytics/events/pluginsPageEvents.js @@ -77,6 +77,28 @@ export const PLUGINS_PAGE_EVENTS = { element_name: 'add_integration', type: normalizeEventParameter(type), }), + navigatedInPluginsFilterList: (filterName) => ({ + ...BASIC_PLUGINS_EVENT_PARAMS, + element_name: normalizeEventParameter(filterName), + }), + clickConfirmUninstallPlugin: (pluginName) => ({ + ...BASIC_PLUGINS_EVENT_PARAMS, + element_name: 'uninstall', + modal: 'uninstall_plugin', + type: normalizeEventParameter(pluginName), + }), + clickDisablePlugin: (pluginName) => ({ + ...BASIC_PLUGINS_EVENT_PARAMS, + element_name: 'disable', + modal: 'disable_plugin', + type: normalizeEventParameter(pluginName), + }), + clickEnablePlugin: (pluginName) => ({ + ...BASIC_PLUGINS_EVENT_PARAMS, + element_name: 'enable', + modal: 'enable_plugin', + type: normalizeEventParameter(pluginName), + }), // GA 3 CANCEL_BTN_UPLOAD_MODAL: { category: PLUGINS_MODAL, @@ -109,11 +131,6 @@ export const PLUGINS_PAGE_EVENTS = { action: 'Click on Btn Cancel on Modal "Uninstall Plugin"', label: 'Close Modal Uninstall Plugin', }, - OK_BTN_UNINSTALL_PLUGIN_MODAL: { - category: PLUGINS_MODAL, - action: 'Click on Btn Uninstall on Modal "Uninstall Plugin"', - label: 'Uninstall Plugin', - }, clickSaveEditAuthorizationBtn: getClickSaveBtnEditAuthorizationEvent(PLUGINS_MODAL), clickDeleteBtnRemoveIntegration: getClickDeleteBtnRemoveIntegrationEvent(PLUGINS_MODAL), pluginInstanceItemClick: getPluginInstanceItemClickEvent(PLUGINS_PAGE), diff --git a/app/src/components/main/analytics/events/uniqueErrorsPageEvents.js b/app/src/components/main/analytics/events/uniqueErrorsPageEvents.js index 9a097ff533..3a6cb8f596 100644 --- a/app/src/components/main/analytics/events/uniqueErrorsPageEvents.js +++ b/app/src/components/main/analytics/events/uniqueErrorsPageEvents.js @@ -74,6 +74,10 @@ export const UNIQUE_ERRORS_PAGE_EVENTS = { ...basicUniqueErrorsPageClickEventParameters, icon_name: 'expand_error', }, + CLICK_MATCHED_TESTS_HEADER_CELL: { + ...basicUniqueErrorsPageClickEventParameters, + icon_name: 'matched_tests', + }, TEST_ITEM_TABS_EVENTS: getClickOnTestItemsTabsEvents(UNIQUE_ERRORS_PAGE), getChangeItemStatusEvent: getChangeItemStatusEventCreator(UNIQUE_ERRORS_PAGE), POST_ISSUE_ACTION: getPostIssueActionEvent(UNIQUE_ERRORS_PAGE), diff --git a/app/src/pages/admin/pluginsPage/pluginsFilter/pluginsFilter.jsx b/app/src/pages/admin/pluginsPage/pluginsFilter/pluginsFilter.jsx index dac51f045f..7d093be566 100644 --- a/app/src/pages/admin/pluginsPage/pluginsFilter/pluginsFilter.jsx +++ b/app/src/pages/admin/pluginsPage/pluginsFilter/pluginsFilter.jsx @@ -14,49 +14,46 @@ * limitations under the License. */ -import React, { Component, Fragment } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; +import { useTracking } from 'react-tracking'; import classNames from 'classnames/bind'; import { getPluginsFilter } from 'common/constants/pluginsFilter'; +import { PLUGINS_PAGE_EVENTS } from 'components/main/analytics/events'; import styles from './pluginsFilter.scss'; const cx = classNames.bind(styles); -export class PluginsFilter extends Component { - static propTypes = { - filterItems: PropTypes.array.isRequired, - onFilterChange: PropTypes.func.isRequired, - activeItem: PropTypes.string.isRequired, - }; - - getFilterItems = () => getPluginsFilter(this.props.filterItems); +export const PluginsFilter = ({ filterItems, onFilterChange, activeItem }) => { + const { trackEvent } = useTracking(); + const getFilterItems = () => getPluginsFilter(filterItems); - changeFilterItem = (e) => { + const changeFilterItem = (e) => { e.preventDefault(); - this.props.onFilterChange(e.currentTarget.id); - }; - - generateItems = () => { - const { activeItem } = this.props; - - return ( - - ); + const { id } = e.currentTarget; + trackEvent(PLUGINS_PAGE_EVENTS.navigatedInPluginsFilterList(id)); + onFilterChange(id); }; - render() { - return {this.generateItems()}; - } -} + return ( + + ); +}; + +PluginsFilter.propTypes = { + filterItems: PropTypes.array.isRequired, + onFilterChange: PropTypes.func.isRequired, + activeItem: PropTypes.string.isRequired, +}; diff --git a/app/src/pages/admin/pluginsPage/pluginsTabs/installedTab/installedTab.jsx b/app/src/pages/admin/pluginsPage/pluginsTabs/installedTab/installedTab.jsx index eece3fbd42..32e1f23456 100644 --- a/app/src/pages/admin/pluginsPage/pluginsTabs/installedTab/installedTab.jsx +++ b/app/src/pages/admin/pluginsPage/pluginsTabs/installedTab/installedTab.jsx @@ -149,6 +149,9 @@ export class InstalledTab extends Component { title: formatMessage(messages.enablePluginTitle), confirmText: formatMessage(COMMON_LOCALE_KEYS.ENABLE), cancelText: formatMessage(COMMON_LOCALE_KEYS.CANCEL), + eventsInfo: { + confirmBtn: PLUGINS_PAGE_EVENTS.clickEnablePlugin(pluginName), + }, }, }); }; @@ -167,6 +170,9 @@ export class InstalledTab extends Component { title: formatMessage(messages.disablePluginTitle), confirmText: formatMessage(COMMON_LOCALE_KEYS.DISABLE), cancelText: formatMessage(COMMON_LOCALE_KEYS.CANCEL), + eventsInfo: { + confirmBtn: PLUGINS_PAGE_EVENTS.clickDisablePlugin(pluginName), + }, }, }); }; diff --git a/app/src/pages/inside/logsPage/logsGrid/flexibleLogTime/flexibleLogTime.jsx b/app/src/pages/inside/logsPage/logsGrid/flexibleLogTime/flexibleLogTime.jsx index d7ef977d4a..7b6ab99c2e 100644 --- a/app/src/pages/inside/logsPage/logsGrid/flexibleLogTime/flexibleLogTime.jsx +++ b/app/src/pages/inside/logsPage/logsGrid/flexibleLogTime/flexibleLogTime.jsx @@ -16,6 +16,7 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { useTracking } from 'react-tracking'; import classNames from 'classnames/bind'; import { dateFormat, getMicroSeconds } from 'common/utils/timeDateUtils'; import { LOG_TIME_FORMAT_ABSOLUTE, LOG_TIME_FORMAT_EXTENDED } from 'controllers/user/constants'; @@ -23,18 +24,22 @@ import { useDispatch, useSelector } from 'react-redux'; import { setLogTimeFormatAction, userIdSelector } from 'controllers/user'; import { logTimeFormatSelector } from 'controllers/user/selectors'; import { setLogTimeFormatInStorage } from 'controllers/log/storageUtils'; +import { LOG_PAGE_EVENTS } from 'components/main/analytics/events'; import styles from './flexibleLogTime.scss'; const cx = classNames.bind(styles); export const FlexibleLogTime = ({ time }) => { const dispatch = useDispatch(); + const { trackEvent } = useTracking(); const logTimeFormat = useSelector(logTimeFormatSelector); const userId = useSelector(userIdSelector); const isAbsolute = () => logTimeFormat === LOG_TIME_FORMAT_ABSOLUTE; const toggleFormat = () => { - const format = isAbsolute() ? LOG_TIME_FORMAT_EXTENDED : LOG_TIME_FORMAT_ABSOLUTE; + const hasAbsoluteState = isAbsolute(); + const format = hasAbsoluteState ? LOG_TIME_FORMAT_EXTENDED : LOG_TIME_FORMAT_ABSOLUTE; + trackEvent(LOG_PAGE_EVENTS.getClickOnLogMicrosecondPrecisionEvent(hasAbsoluteState)); dispatch(setLogTimeFormatAction(format)); setLogTimeFormatInStorage(userId, format); }; diff --git a/app/src/pages/inside/uniqueErrorsPage/uniqueErrorsGrid/uniqueErrorsGrid.jsx b/app/src/pages/inside/uniqueErrorsPage/uniqueErrorsGrid/uniqueErrorsGrid.jsx index ca1b2b8c60..3f39fe854c 100644 --- a/app/src/pages/inside/uniqueErrorsPage/uniqueErrorsGrid/uniqueErrorsGrid.jsx +++ b/app/src/pages/inside/uniqueErrorsPage/uniqueErrorsGrid/uniqueErrorsGrid.jsx @@ -28,6 +28,7 @@ import { NAMESPACE } from 'controllers/uniqueErrors'; import { querySelector } from 'controllers/pages'; import { ExtensionLoader } from 'components/extensionLoader'; import { SORTING_DESC, withSortingURL } from 'controllers/sorting'; +import { UNIQUE_ERRORS_PAGE_EVENTS } from 'components/main/analytics/events'; import { EmptyUniqueErrors } from '../emptyUniqueErrors'; import { ClusterItemsGridRow } from './clusterItemsGridRow'; import styles from './uniqueErrorsGrid.scss'; @@ -90,6 +91,7 @@ export const UniqueErrorsGridWrapped = ({ parentLaunch, data, loading, ...rest } customProps: { gridHeaderCellStyles: cx('matched-header'), }, + sortingEventInfo: UNIQUE_ERRORS_PAGE_EVENTS.CLICK_MATCHED_TESTS_HEADER_CELL, }); return (