Skip to content

Commit

Permalink
Enable tour features
Browse files Browse the repository at this point in the history
- Enable tour config feature in main.js
- Add jquery-ui dialog
- Change name of Google analytics import name to be consistent with codebase
  • Loading branch information
ZachTRice committed Dec 7, 2017
1 parent 3983b3d commit 2052492
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ window.onload = () => {
// ui.naturalEvents = naturalEventsUI(models, ui, config, naturalEventsRequest(models, ui, config));
}
ui.link = linkUi(models, config);
// ui.tour = Tour(models, ui, config);
ui.tour = tour(models, ui, config);
// ui.info = uiInfo(ui, config);
if (config.features.alert) {
// ui.alert = notificationsUi(ui, config);
Expand Down
7 changes: 4 additions & 3 deletions web/js/tour.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import $ from 'jquery';
import 'jquery-ui/dialog';
import 'jquery.joyride';
import util from './util/util';
import wvui from './ui/ui';
import {GA} from 'worldview-components';
import {GA as googleAnalytics} from 'worldview-components';
import feedbackModal from './feedback';

export default function (models, ui, config) {
Expand Down Expand Up @@ -169,7 +170,7 @@ export default function (models, ui, config) {
var onStop = function (index, tip, button) {
// console.log(index, tip, button);
setTourState();
GA.event('Tour', 'Click', 'Post Tour View', index + 1);
googleAnalytics.event('Tour', 'Click', 'Post Tour View', index + 1);
if (index === 5 && button !== 'previous') {
endTour();
}
Expand All @@ -183,7 +184,7 @@ export default function (models, ui, config) {
$('.ui-dialog-content')
.dialog('close');
initTourState();
GA.event('Tour', 'Click', 'Take Tour');
googleAnalytics.event('Tour', 'Click', 'Take Tour');
$('#joyRideTipContent')
.joyride({
adjustForPhone: false,
Expand Down

0 comments on commit 2052492

Please sign in to comment.