Merge pull request #4638 from paulkaplan/remove-analytics

Remove most of the GA events
This commit is contained in:
Paul Kaplan authored and GitHub committed 2019-03-13 17:03:21 -04:00
commit 1dd3e1d26a
8 files changed
-54

No files matched your search

-2
View File
@@ -9,7 +9,6 @@ import Modal from '../../containers/modal.jsx';
import Divider from '../divider/divider.jsx';
import Filter from '../filter/filter.jsx';
import TagButton from '../../containers/tag-button.jsx';
import analytics from '../../lib/analytics';
import styles from './library.css';
@@ -60,7 +59,6 @@ class LibraryComponent extends React.Component {
}
handleClose () {
this.props.onRequestClose();
analytics.pageview(`/${this.props.id}/search?q=${this.state.filterQuery}`);
}
handleTagClick (tag) {
this.setState({
-6
View File
@@ -5,7 +5,6 @@ import {defineMessages, injectIntl, intlShape} from 'react-intl';
import {connect} from 'react-redux';
import VM from 'scratch-vm';
import analytics from '../lib/analytics';
import backdropLibraryContent from '../lib/libraries/backdrops.json';
import backdropTags from '../lib/libraries/backdrop-tags';
import LibraryComponent from '../components/library/library.jsx';
@@ -36,11 +35,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 (
-9
View File
@@ -4,7 +4,6 @@ import React from 'react';
import VM from 'scratch-vm';
import {connect} from 'react-redux';
import analytics from '../lib/analytics';
import ControlsComponent from '../components/controls/controls.jsx';
class Controls extends React.Component {
@@ -24,19 +23,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 {
-6
View File
@@ -4,7 +4,6 @@ import React from 'react';
import {defineMessages, injectIntl, intlShape} from 'react-intl';
import VM from 'scratch-vm';
import analytics from '../lib/analytics';
import costumeLibraryContent from '../lib/libraries/costumes.json';
import spriteTags from '../lib/libraries/sprite-tags';
import LibraryComponent from '../components/library/library.jsx';
@@ -38,11 +37,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 (
-13
View File
@@ -6,7 +6,6 @@ import {defineMessages, injectIntl, intlShape} from 'react-intl';
import extensionLibraryContent from '../lib/libraries/extensions/index.jsx';
import analytics from '../lib/analytics';
import LibraryComponent from '../components/library/library.jsx';
import extensionIcon from '../components/action-menu/icon--sprite.svg';
@@ -46,18 +45,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 => ({
-6
View File
@@ -4,7 +4,6 @@ import React from 'react';
import {connect} from 'react-redux';
import {defineMessages, injectIntl, intlShape} from 'react-intl';
import analytics from '../lib/analytics';
import log from '../lib/log';
import sharedMessages from '../lib/shared-messages';
@@ -119,11 +118,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, '.');
-6
View File
@@ -5,7 +5,6 @@ import {defineMessages, injectIntl, intlShape} from 'react-intl';
import VM from 'scratch-vm';
import AudioEngine from 'scratch-audio';
import analytics from '../lib/analytics';
import LibraryComponent from '../components/library/library.jsx';
import soundIcon from '../components/asset-panel/icon--sound.svg';
@@ -125,11 +124,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
-6
View File
@@ -4,7 +4,6 @@ import React from 'react';
import {injectIntl, intlShape, defineMessages} from 'react-intl';
import VM from 'scratch-vm';
import analytics from '../lib/analytics';
import spriteLibraryContent from '../lib/libraries/sprites.json';
import randomizeSpritePosition from '../lib/randomize-sprite-position';
import spriteTags from '../lib/libraries/sprite-tags';
@@ -32,11 +31,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 (