Skip to content
Snippets Groups Projects
Commit 2a0f69c1 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Record next step events for tutorials to help understand progress

parent c91c18e1
No related branches found
Tags 0.1.0-prerelease.20200618185940
No related merge requests found
import analytics from '../lib/analytics';
import decks from '../lib/libraries/decks/index.jsx';
const CLOSE_CARDS = 'scratch-gui/cards/CLOSE_CARDS';
......@@ -38,6 +40,11 @@ const reducer = function (state, action) {
});
case NEXT_STEP:
if (state.activeDeckId !== null) {
analytics.event({
category: 'how-to',
action: 'next step',
label: `${state.activeDeckId} - ${state.step}`
});
return Object.assign({}, state, {
step: state.step + 1
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment