Skip to content

Commit faaf322

Browse files
authored
Merge pull request #329 from scratchfoundation/extension-added
feat: statistics for extension-added event
2 parents 4ed5289 + 713abb0 commit faaf322

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/scratch-gui/src/containers/blocks.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import React from 'react';
77
import VMScratchBlocks from '../lib/blocks';
88
import VM from '@scratch/scratch-vm';
99

10+
import analytics from '../lib/analytics';
1011
import log from '../lib/log.js';
1112
import Prompt from './prompt.jsx';
1213
import BlocksComponent from '../components/blocks/blocks.jsx';
@@ -434,6 +435,12 @@ class Blocks extends React.Component {
434435
}
435436
}
436437
handleExtensionAdded (categoryInfo) {
438+
analytics.event({
439+
category: 'extensions',
440+
action: 'added',
441+
label: categoryInfo.id
442+
});
443+
437444
const defineBlocks = blockInfoArray => {
438445
if (blockInfoArray && blockInfoArray.length > 0) {
439446
const staticBlocksJson = [];

0 commit comments

Comments
 (0)