Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

search console gtm hard code test

Ed Plato4b16aaaffa3f
diff --git a/web/index.html b/web/index.html
index af1e97722..ee3b35b67 100644
--- a/web/index.html
+++ b/web/index.html
@@ -11,7 +11,21 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (https://opensource.g
<html lang="en" prefix="og: https://ogp.me/ns#">
<head>
+ <!-- Google Tag Manager -->
+ <script async>(function (w, d, s, l, i) {
+ w[l] = w[l] || []; w[l].push({
+ 'gtm.start':
+ new Date().getTime(), event: 'gtm.js'
+ }); var f = d.getElementsByTagName(s)[0],
+ j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
+ 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
+ })(window, document, 'script', 'dataLayer', 'GTM-WNP7MLF');
+
+ window.dataLayer = window.dataLayer || [];
+ </script>
+ <!-- End Google Tag Manager -->
<title>@OFFICIAL_NAME@</title>
+ <meta name="google-site-verification" content="cX2U525Pb71Qs92wY4LTYsP_Eu1Y9dMaLgE2XQU9-Pw" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script type="text/javascript">
@@ -21,9 +35,8 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (https://opensource.g
}
</script>
- <!-- Favicon -->
+ <!-- favicon -->
<link rel="shortcut icon" type="image/x-icon" href="brand/images/favicon.ico">
- <!-- favicon -->
<!-- meta defines -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
@@ -52,6 +65,9 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (https://opensource.g
</head>
<body>
+ <!-- Google Tag Manager (noscript) -->
+ <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WNP7MLF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
+ <!-- End Google Tag Manager (noscript) -->
<div data-role="page" id="app">
</div>
<div id="wv-vector-metadata" class="wv-vector-metadata"></div>
diff --git a/web/js/app.js b/web/js/app.js
index 0e649b6b4..a10fb7004 100644
--- a/web/js/app.js
+++ b/web/js/app.js
@@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import PropTypes from 'prop-types';
// eslint-disable-next-line no-unused-vars
import whatInput from 'what-input';
-import googleTagManager from 'googleTagManager';
+// import googleTagManager from 'googleTagManager';
// Utils
import { calculateResponsiveState } from 'redux-responsive';
@@ -128,28 +128,28 @@ class App extends React.Component {
config.parameters = state;
// get user IP address for GTM/GA using https://www.ipify.org/ API
- const getIpAddress = async() => {
- const response = await fetch('https://api.ipify.org?format=json');
- const json = await response.json();
- const ipAddress = json.ip;
-
- googleTagManager.pushEvent({
- event: 'ipAddress',
- ipAddress,
- });
- };
+ // const getIpAddress = async() => {
+ // const response = await fetch('https://api.ipify.org?format=json');
+ // const json = await response.json();
+ // const ipAddress = json.ip;
+
+ // googleTagManager.pushEvent({
+ // event: 'ipAddress',
+ // ipAddress,
+ // });
+ // };
const main = function() {
// Load any additional scripts as needed
if (config.scripts) {
util.loadScipts(config.scripts);
}
- if (config.features.googleTagManager) {
- googleTagManager.init(config.features.googleTagManager.id); // Insert google tag manager
- if (!/localhost/.test(window.location.href)) {
- getIpAddress();
- }
- }
+ // if (config.features.googleTagManager) {
+ // googleTagManager.init(config.features.googleTagManager.id); // Insert google tag manager
+ // if (!/localhost/.test(window.location.href)) {
+ // getIpAddress();
+ // }
+ // }
// Console notifications
if (Brand.release()) {