Interactive interface for browsing global, full-resolution satellite imagery
Tweak google analytics params and comment each tag
ZachTRice4dfb51f09960
diff --git a/web/js/components/tour/modal-tour-in-progress.js b/web/js/components/tour/modal-tour-in-progress.jsindex 5414401b8..ee850aa82 100644--- a/web/js/components/tour/modal-tour-in-progress.js+++ b/web/js/components/tour/modal-tour-in-progress.js@@ -16,7 +16,6 @@ import { parse as animationParser } from '../../animation/anim';import palettes from '../../palettes/palettes';import { dataParser } from '../../data/data';import { parse as projectionParser } from '../../projection/projection';-import googleTagManager from 'googleTagManager';class ModalInProgress extends React.Component {@@ -105,7 +104,7 @@ class ModalInProgress extends React.Component {models.tour.active = true;models.tour.select(this.props.currentStoryId);- // Google Analytics: record current story id and steps+ // Record selected story's id, current steps, and total steps to analyticsgoogleTagManager.pushEvent({'event': 'tour_selected_story','story': {diff --git a/web/js/components/tour/tour.js b/web/js/components/tour/tour.jsindex efcef5359..2b16a48c7 100644--- a/web/js/components/tour/tour.js+++ b/web/js/components/tour/tour.js@@ -61,8 +61,12 @@ class Tour extends React.Component {this.setState({modalComplete: !this.state.modalComplete});+ // The tour completed modal has been shown (all steps complete)googleTagManager.pushEvent({- 'event': 'tour_completed'+ 'event': 'tour_completed',+ 'story': {+ 'id': this.state.currentStoryId+ }});}diff --git a/web/js/tour/ui.js b/web/js/tour/ui.jsindex a206df960..bf2ffb561 100644--- a/web/js/tour/ui.js+++ b/web/js/tour/ui.js@@ -97,6 +97,7 @@ export function tourUi(models, ui, config) {if (hideTour && config.buildDate) {let buildDate = new Date(config.buildDate);let tourDate = new Date(hideTour);+ // Tour hidden when visiting fresh URLgoogleTagManager.pushEvent({'event': 'tour_start_hidden','buildDate': buildDate,@@ -111,7 +112,7 @@ export function tourUi(models, ui, config) {} else if (hideTour) {return false;} else {- // Tour auto start+ // Tour shown when visiting fresh URLgoogleTagManager.pushEvent({'event': 'tour_start'});@@ -121,6 +122,7 @@ export function tourUi(models, ui, config) {self.resetTour = function(e) {if (e) e.preventDefault();+ // Tour startup modal shown by clicking "More Stories" button at end of storygoogleTagManager.pushEvent({'event': 'tour_more_stories_button'});@@ -130,6 +132,7 @@ export function tourUi(models, ui, config) {self.startTour = function(e) {if (e) e.preventDefault();+ // Tour shown by manually clicking "Start Tour" buttongoogleTagManager.pushEvent({'event': 'tour_start_button'});@@ -144,12 +147,6 @@ export function tourUi(models, ui, config) {self.selectTour = function(e, currentStory, currentStoryIndex, currentStoryId) {let totalSteps = currentStory.steps;if (e) e.preventDefault();- googleTagManager.pushEvent({- 'event': 'tour_selected_story',- 'story': {- 'id': currentStoryId- }- });self.reactComponent.setState({models: models,config: config,@@ -169,6 +166,7 @@ export function tourUi(models, ui, config) {self.hideTour = function(e) {var hideTour = localStorage.getItem('hideTour');+ // Checkbox to "hide tour modal until a new story has been added" has been checkedgoogleTagManager.pushEvent({'event': 'tour_hide_checked'});@@ -182,6 +180,7 @@ export function tourUi(models, ui, config) {self.showTour = function(e) {var hideTour = localStorage.getItem('hideTour');+ // Checkbox to "hide tour modal until a new story has been added" has been checkedgoogleTagManager.pushEvent({'event': 'tour_hide_unchecked'});