Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Replace googleAnalytics triggers that were removed #1118

Benjamin Kingc4722cae5ecb
diff --git a/web/js/data/ui.js b/web/js/data/ui.js
index f51e6e06e..67d83e940 100644
--- a/web/js/data/ui.js
+++ b/web/js/data/ui.js
@@ -41,6 +41,7 @@ export function dataUi(models, ui, config) {
ui.sidebar.events.on('selectTab', function(tab) {
if (tab === 'download') {
+ googleAnalytics.event('Data Download', 'Click', 'Data Download Tab');
model.activate();
} else {
model.deactivate();
diff --git a/web/js/natural-events/ui.js b/web/js/natural-events/ui.js
index de27bf86a..98debfe43 100644
--- a/web/js/natural-events/ui.js
+++ b/web/js/natural-events/ui.js
@@ -5,10 +5,10 @@ import olProj from 'ol/proj';
import markers from './markers';
import track from './track';
-
import wvui from '../ui/ui';
import util from '../util/util';
import { naturalEventsUtilGetEventById } from './util';
+import googleAnalytics from '../components/util/google-analytics';
const zoomLevelReference = {
Wildfires: 8,
@@ -66,6 +66,7 @@ export default function naturalEventsUI(models, ui, config, request) {
ui.sidebar.events.on('selectTab', function(tab) {
if (tab === 'events') {
model.active = true;
+ googleAnalytics.event('Natural Events', 'Click', 'Events Tab');
if (self.markers.length === 0) {
// createEventList();