Analytics events for plugin management
Summary: Send some analytics events related to plugin management: auto-update, install, uninstall, load. Reviewed By: passy Differential Revision: D25557788 fbshipit-source-id: 14dc9ae5793e9b18be13f2d483069d8d00c8b863
This commit is contained in:
committed by
Facebook GitHub Bot
parent
31ace3bd09
commit
3a65f86c68
@@ -55,6 +55,7 @@ import {InstalledPluginDetails} from 'plugin-lib';
|
||||
import semver from 'semver';
|
||||
import {activatePlugin} from './reducers/pluginManager';
|
||||
import {produce} from 'immer';
|
||||
import {reportUsage} from './utils/metrics';
|
||||
|
||||
const {Text, Link} = Typography;
|
||||
|
||||
@@ -382,6 +383,13 @@ class PluginContainer extends PureComponent<Props, State> {
|
||||
reloadPlugin() {
|
||||
const {activatePlugin, latestInstalledVersion} = this.props;
|
||||
if (latestInstalledVersion) {
|
||||
reportUsage(
|
||||
'plugin-auto-update:alert:reloadClicked',
|
||||
{
|
||||
version: latestInstalledVersion.version,
|
||||
},
|
||||
latestInstalledVersion.id,
|
||||
);
|
||||
activatePlugin({
|
||||
plugin: latestInstalledVersion,
|
||||
enable: false,
|
||||
|
||||
Reference in New Issue
Block a user