Interactive interface for browsing global, full-resolution satellite imagery
remove google analytics file, import, and config code, refactor googleTagManager import to use global alias
Ed Platod5128383bfee
diff --git a/config/default/common/features.json b/config/default/common/features.jsonindex 169884b62..d17b8ccc1 100644--- a/config/default/common/features.json+++ b/config/default/common/features.json@@ -7,9 +7,6 @@"compare": true,"tour": true,"feedback": true,- "googleAnalytics": {- "id": "UA-88182106-1"- },"googleTagManager": {"id": "GTM-WNP7MLF"},diff --git a/web/js/app.js b/web/js/app.jsindex 37ed6f5d5..d443e3c90 100644--- a/web/js/app.js+++ b/web/js/app.js@@ -1,8 +1,7 @@import React from 'react';import lodashEach from 'lodash/each';-import googleAnalytics from './components/util/google-analytics';-import googleTagManager from './components/util/google-tag-manager';+import googleTagManager from 'googleTagManager';// Utilsimport util from './util/util';@@ -394,9 +393,6 @@ class App extends React.Component {.register(models.palettes).register(models.map);models.link.load(state);- if (config.features.googleAnalytics) {- googleAnalytics.init(config.features.googleAnalytics.id); // Insert google tracking- }if (config.features.googleTagManager) {googleTagManager.init(config.features.googleTagManager.id); // Insert google tag manager}diff --git a/web/js/components/util/google-analytics.js b/web/js/components/util/google-analytics.jsdeleted file mode 100644index 86c2c7b1f..000000000--- a/web/js/components/util/google-analytics.js+++ /dev/null@@ -1,50 +0,0 @@-/* eslint-disable */--export default {- /*- * Initialize GA tracking if tracking- * code is present- *- * @func init- * @static- *- * @param Category {id} GA tracking code- *- * @return {void}- */- init(id) {- if(id) {- (function(i, s, o, g, r, a, m) {- i['GoogleAnalyticsObject']=r;- i[r]=i[r]||function() {- (i[r].q=i[r].q||[]).push(arguments);- },- i[r].l=1*new Date();- a=s.createElement(o),- m=s.getElementsByTagName(o)[0];- a.async=1;- a.src=g;- m.parentNode.insertBefore(a, m);- })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');- ga('create', id, 'auto');- ga('send', 'pageview');- }- },-- /*- * @func TrackEventGA- * @static- *- * @param Category {string} Event group name- * @param Action {string} Type of user interaction- * @param Label {string} Optional string for better verification of the event- * @param Value {number} Optional number to associate with event- *- * @return {void}- */- event(category, action, label, value) {- if (typeof (ga) !== 'undefined') {- ga('send', 'event', category, action, label, value);- }- }-};