From e746b98d83ffeb8da4d3a90d4f2c565f98f64a46 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Mon, 11 Mar 2019 15:13:46 -0400 Subject: [PATCH] Remove some of the high-volume analytics events Too much traffic, not enough value. Leaving stuff having to do with tips library/tutorial card navigation as well as hardware extension connectivity, as those help us find issues with Scratch. --- src/components/library/library.jsx | 1 - src/containers/backdrop-library.jsx | 5 ----- src/containers/controls.jsx | 8 -------- src/containers/costume-library.jsx | 5 ----- src/containers/extension-library.jsx | 12 ------------ src/containers/sb-file-uploader.jsx | 5 ----- src/containers/sound-library.jsx | 5 ----- src/containers/sprite-library.jsx | 5 ----- 8 files changed, 46 deletions(-) diff --git a/src/components/library/library.jsx b/src/components/library/library.jsx index 8073b0f49..3a410826a 100644 --- a/src/components/library/library.jsx +++ b/src/components/library/library.jsx @@ -60,7 +60,6 @@ class LibraryComponent extends React.Component { } handleClose () { this.props.onRequestClose(); - analytics.pageview(`/${this.props.id}/search?q=${this.state.filterQuery}`); } handleTagClick (tag) { this.setState({ diff --git a/src/containers/backdrop-library.jsx b/src/containers/backdrop-library.jsx index 9d7a709cc..f1eb43854 100644 --- a/src/containers/backdrop-library.jsx +++ b/src/containers/backdrop-library.jsx @@ -36,11 +36,6 @@ class BackdropLibrary extends React.Component { }; this.props.vm.setEditingTarget(this.props.stageID); this.props.vm.addBackdrop(item.md5, vmBackdrop); - analytics.event({ - category: 'library', - action: 'Select Backdrop', - label: item.name - }); } render () { return ( diff --git a/src/containers/controls.jsx b/src/containers/controls.jsx index db052b494..fc98d9840 100644 --- a/src/containers/controls.jsx +++ b/src/containers/controls.jsx @@ -24,19 +24,11 @@ class Controls extends React.Component { this.props.vm.start(); } this.props.vm.greenFlag(); - analytics.event({ - category: 'general', - action: 'Green Flag' - }); } } handleStopAllClick (e) { e.preventDefault(); this.props.vm.stopAll(); - analytics.event({ - category: 'general', - action: 'Stop Button' - }); } render () { const { diff --git a/src/containers/costume-library.jsx b/src/containers/costume-library.jsx index aafe18bc3..9a5214d97 100644 --- a/src/containers/costume-library.jsx +++ b/src/containers/costume-library.jsx @@ -38,11 +38,6 @@ class CostumeLibrary extends React.PureComponent { skinId: null }; this.props.vm.addCostumeFromLibrary(item.md5, vmCostume); - analytics.event({ - category: 'library', - action: 'Select Costume', - label: item.name - }); } render () { return ( diff --git a/src/containers/extension-library.jsx b/src/containers/extension-library.jsx index a23f1e6c8..7eb68a389 100644 --- a/src/containers/extension-library.jsx +++ b/src/containers/extension-library.jsx @@ -46,18 +46,6 @@ class ExtensionLibrary extends React.PureComponent { }); } } - let gaLabel = ''; - if (typeof (item.name) === 'string') { - gaLabel = item.name; - } else { - // Name is localized, get the default message for the gaLabel - gaLabel = item.name.props.defaultMessage; - } - analytics.event({ - category: 'library', - action: 'Select Extension', - label: gaLabel - }); } render () { const extensionLibraryThumbnailData = extensionLibraryContent.map(extension => ({ diff --git a/src/containers/sb-file-uploader.jsx b/src/containers/sb-file-uploader.jsx index 5ec6c6075..c2fd4ee28 100644 --- a/src/containers/sb-file-uploader.jsx +++ b/src/containers/sb-file-uploader.jsx @@ -119,11 +119,6 @@ class SBFileUploader extends React.Component { const filename = this.fileToUpload && this.fileToUpload.name; this.props.vm.loadProject(this.reader.result) .then(() => { - analytics.event({ - category: 'project', - action: 'Import Project File', - nonInteraction: true - }); // Remove the hash if any (without triggering a hash change event or a reload) try { // Can fail e.g. when GUI is loaded from static file (integration tests) history.replaceState({}, document.title, '.'); diff --git a/src/containers/sound-library.jsx b/src/containers/sound-library.jsx index 154ddaa81..e186196d3 100644 --- a/src/containers/sound-library.jsx +++ b/src/containers/sound-library.jsx @@ -125,11 +125,6 @@ class SoundLibrary extends React.PureComponent { this.props.vm.addSound(vmSound).then(() => { this.props.onNewSound(); }); - analytics.event({ - category: 'library', - action: 'Select Sound', - label: soundItem.name - }); } render () { // @todo need to use this hack to avoid library using md5 for image diff --git a/src/containers/sprite-library.jsx b/src/containers/sprite-library.jsx index 7f885cbe4..56010a222 100644 --- a/src/containers/sprite-library.jsx +++ b/src/containers/sprite-library.jsx @@ -32,11 +32,6 @@ class SpriteLibrary extends React.PureComponent { this.props.vm.addSprite(JSON.stringify(item.json)).then(() => { this.props.onActivateBlocksTab(); }); - analytics.event({ - category: 'library', - action: 'Select Sprite', - label: item.name - }); } render () { return (