diff --git a/package.json b/package.json
index b450453ba..c02895c9e 100644
--- a/package.json
+++ b/package.json
@@ -190,8 +190,7 @@
"scratch-vm": "3.0.9",
"shortid": "^2.2.14",
"slugg": "^1.2.1",
- "uuid": "^3.3.2",
- "zepto": "^1.2.0"
+ "uuid": "^3.3.2"
},
"optionalDependencies": {
"printer": "^0.2.2"
diff --git a/src/components/edu-stage/edu-stage.jsx b/src/components/edu-stage/edu-stage.jsx
index fe4e3b801..93b8bb3a3 100644
--- a/src/components/edu-stage/edu-stage.jsx
+++ b/src/components/edu-stage/edu-stage.jsx
@@ -16,7 +16,7 @@ import {
import { eduUrl } from '../../lib/routing'
import { gamesKeyed } from '../../lib/edu/'
import VideoPlayer from '../video-player/video-player.jsx'
-import { guiTypePages, paEvent } from '../../lib/piano-analytics/main'
+import { buildGuiPage, paEvent } from '../../lib/piano-analytics/main'
import styles from './edu-stage.css'
const EduStageComponent = (props) => {
@@ -119,12 +119,16 @@ const EduStageComponent = (props) => {
}
const sendPaEvent = (props, clickName) => {
- const pages = guiTypePages(props.gameId)
- pages.push('Code')
+ const pages = buildGuiPage(props.gameId, false, props.activeTabIndex)
- let target = `${props.slideIndex}/${props.slideCount}`
- if (clickName == 'Weiter') {
- target = !props.linkNextGame ? `${props.slideIndex + 2}/${props.slideCount}` : 'Nächstes Lernspiel'
+ // 1-based number of the slide shown after the click
+ let target = `${props.slideIndex + 1}/${props.slideCount}`
+ if (clickName == 'Zurück') {
+ target = `${props.slideIndex}/${props.slideCount}`
+ } else if (clickName == 'Weiter') {
+ target = !props.linkNextGame
+ ? `${props.slideIndex + 2}/${props.slideCount}`
+ : 'Nächstes Lernspiel'
}
paEvent.clickAction({
@@ -132,7 +136,7 @@ const sendPaEvent = (props, clickName) => {
pageType: 'Spiele',
chapter1: 'Tutorial',
chapter2: clickName,
- target
+ target,
})
}
@@ -150,6 +154,7 @@ EduStageComponent.propTypes = {
slideIndex: PropTypes.number,
toggleFullscreen: PropTypes.func.isRequired,
finished: PropTypes.bool,
+ activeTabIndex: PropTypes.number,
preVideo: PropTypes.string,
postVideo: PropTypes.string,
}
@@ -162,6 +167,7 @@ const mapStateToProps = (state, ownProps) => {
isEnabled: state.scratchGui.eduLayer.enabled,
imageSrc: '',
gameId: ownProps.match.params.eduId,
+ activeTabIndex: state.scratchGui.editorTab.activeTabIndex,
caption: '',
}
diff --git a/src/components/gui/gui.jsx b/src/components/gui/gui.jsx
index a52e27006..642375ff9 100644
--- a/src/components/gui/gui.jsx
+++ b/src/components/gui/gui.jsx
@@ -106,11 +106,15 @@ const GUIComponent = (props) => {
const logClickEvent = (eventFn, eventName) => {
paEvent.clickAction({
- pages: buildGuiPage(props.eduId, props.isNewProject, props.activeTabIndex),
+ pages: buildGuiPage(
+ props.eduId,
+ props.isNewProject,
+ props.activeTabIndex
+ ),
pageType: 'Spiele',
chapter1: 'Speichern',
chapter2: eventName,
- target: eventName
+ target: eventName,
})
eventFn()
}
@@ -138,7 +142,12 @@ const GUIComponent = (props) => {
{saveProjectError}