Skip to content

Commit 8aec537

Browse files
committed
Merge pull request #329 from scratchfoundation/extension-added
feat: statistics for extension-added event
2 parents 78969f3 + 3d8972f commit 8aec537

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';
@@ -440,6 +441,12 @@ class Blocks extends React.Component {
440441
}
441442
}
442443
handleExtensionAdded (categoryInfo) {
444+
analytics.event({
445+
category: 'extensions',
446+
action: 'added',
447+
label: categoryInfo.id
448+
});
449+
443450
const defineBlocks = blockInfoArray => {
444451
if (blockInfoArray && blockInfoArray.length > 0) {
445452
const staticBlocksJson = [];

0 commit comments

Comments
 (0)