Remove most of the analytics.pageview events, keeping the search queries
This commit is contained in:
1 parent
4df56e41ca
commit
54eea42e15
5 files changed
-36
No files matched your search
@@ -7,7 +7,6 @@ import React from 'react';
|
||||
import VMScratchBlocks from '../lib/blocks';
|
||||
import VM from 'scratch-vm';
|
||||
|
||||
import analytics from '../lib/analytics';
|
||||
import log from '../lib/log.js';
|
||||
import Prompt from './prompt.jsx';
|
||||
import BlocksComponent from '../components/blocks/blocks.jsx';
|
||||
@@ -113,8 +112,6 @@ class Blocks extends React.Component {
|
||||
if (this.props.isVisible) {
|
||||
this.setLocale();
|
||||
}
|
||||
|
||||
analytics.pageview('/editors/blocks');
|
||||
}
|
||||
shouldComponentUpdate (nextProps, nextState) {
|
||||
return (
|
||||
|
||||
@@ -4,8 +4,6 @@ import bindAll from 'lodash.bindall';
|
||||
import VM from 'scratch-vm';
|
||||
import PaintEditor from 'scratch-paint';
|
||||
|
||||
import analytics from '../lib/analytics';
|
||||
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
class PaintEditorWrapper extends React.Component {
|
||||
@@ -16,9 +14,6 @@ class PaintEditorWrapper extends React.Component {
|
||||
'handleUpdateName'
|
||||
]);
|
||||
}
|
||||
componentDidMount () {
|
||||
analytics.pageview('/editors/paint');
|
||||
}
|
||||
shouldComponentUpdate (nextProps) {
|
||||
return this.props.imageId !== nextProps.imageId ||
|
||||
this.props.rtl !== nextProps.rtl ||
|
||||
|
||||
@@ -44,7 +44,6 @@ class SoundEditor extends React.Component {
|
||||
}
|
||||
componentDidMount () {
|
||||
this.audioBufferPlayer = new AudioBufferPlayer(this.props.samples, this.props.sampleRate);
|
||||
analytics.pageview('/editors/sound');
|
||||
}
|
||||
componentWillReceiveProps (newProps) {
|
||||
if (newProps.soundId !== this.props.soundId) { // A different sound has been selected
|
||||
|
||||
@@ -7,7 +7,6 @@ import {connect} from 'react-redux';
|
||||
import {setProjectUnchanged} from '../reducers/project-changed';
|
||||
import {
|
||||
LoadingStates,
|
||||
defaultProjectId,
|
||||
getIsCreatingNew,
|
||||
getIsFetchingWithId,
|
||||
getIsLoading,
|
||||
@@ -21,7 +20,6 @@ import {
|
||||
BLOCKS_TAB_INDEX
|
||||
} from '../reducers/editor-tab';
|
||||
|
||||
import analytics from './analytics';
|
||||
import log from './log';
|
||||
import storage from './storage';
|
||||
|
||||
@@ -81,17 +79,6 @@ const ProjectFetcherHOC = function (WrappedComponent) {
|
||||
throw new Error('Could not find project');
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
if (projectId !== defaultProjectId) {
|
||||
// if not default project, register a project load event
|
||||
analytics.event({
|
||||
category: 'project',
|
||||
action: 'Load Project',
|
||||
label: projectId,
|
||||
nonInteraction: true
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.props.onError(err);
|
||||
log.error(err);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import analytics from '../lib/analytics';
|
||||
|
||||
const OPEN_MODAL = 'scratch-gui/modals/OPEN_MODAL';
|
||||
const CLOSE_MODAL = 'scratch-gui/modals/CLOSE_MODAL';
|
||||
|
||||
@@ -59,51 +57,39 @@ const closeModal = function (modal) {
|
||||
};
|
||||
};
|
||||
const openBackdropLibrary = function () {
|
||||
analytics.pageview('/libraries/backdrops');
|
||||
return openModal(MODAL_BACKDROP_LIBRARY);
|
||||
};
|
||||
const openCameraCapture = function () {
|
||||
analytics.pageview('/modals/camera');
|
||||
return openModal(MODAL_CAMERA_CAPTURE);
|
||||
};
|
||||
const openCostumeLibrary = function () {
|
||||
analytics.pageview('/libraries/costumes');
|
||||
return openModal(MODAL_COSTUME_LIBRARY);
|
||||
};
|
||||
const openExtensionLibrary = function () {
|
||||
analytics.pageview('/libraries/extensions');
|
||||
return openModal(MODAL_EXTENSION_LIBRARY);
|
||||
};
|
||||
const openImportInfo = function () {
|
||||
analytics.pageview('modals/import');
|
||||
return openModal(MODAL_IMPORT_INFO);
|
||||
};
|
||||
const openLoadingProject = function () {
|
||||
analytics.pageview('modals/loading');
|
||||
return openModal(MODAL_LOADING_PROJECT);
|
||||
};
|
||||
const openPreviewInfo = function () {
|
||||
analytics.pageview('/modals/preview');
|
||||
return openModal(MODAL_PREVIEW_INFO);
|
||||
};
|
||||
const openSoundLibrary = function () {
|
||||
analytics.pageview('/libraries/sounds');
|
||||
return openModal(MODAL_SOUND_LIBRARY);
|
||||
};
|
||||
const openSpriteLibrary = function () {
|
||||
analytics.pageview('/libraries/sprites');
|
||||
return openModal(MODAL_SPRITE_LIBRARY);
|
||||
};
|
||||
const openSoundRecorder = function () {
|
||||
analytics.pageview('/modals/microphone');
|
||||
return openModal(MODAL_SOUND_RECORDER);
|
||||
};
|
||||
const openConnectionModal = function () {
|
||||
analytics.pageview('/modals/connection');
|
||||
return openModal(MODAL_CONNECTION);
|
||||
};
|
||||
const openTipsLibrary = function () {
|
||||
analytics.pageview('/modals/tips');
|
||||
return openModal(MODAL_TIPS_LIBRARY);
|
||||
};
|
||||
const closeBackdropLibrary = function () {
|
||||
|
||||
Reference in new issue
Block a user