Revert "Update index.html"

This reverts commit d6d4ee3371.
This commit is contained in:
Daniel LaForce 2024-08-01 21:54:08 -06:00
parent d6d4ee3371
commit acfd10d20a
1 changed files with 8 additions and 21 deletions

View File

@ -5,10 +5,10 @@
<!-- Google tag (gtag.js) --> <!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-CC1B9CQ691"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-CC1B9CQ691"></script>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);} function gtag(){dataLayer.push(arguments);}
gtag('js', new Date()); gtag('js', new Date());
gtag('config', 'G-CC1B9CQ691'); gtag('config', 'G-CC1B9CQ691');
</script> </script>
<style> <style>
body { body {
@ -59,8 +59,8 @@
</head> </head>
<body> <body>
<h1>CSMS Claims and Neighbors</h1> <h1>CSMS Claims and Neighbors</h1>
<iframe id="google-maps-iframe" src=""></iframe> <iframe src="https://csms.argobox.com/redirect/google-maps"></iframe>
<iframe id="gaia-gps-iframe" src=""></iframe> <iframe src="https://csms.argobox.com/redirect/gaia-gps"></iframe>
<div id="button-container"> <div id="button-container">
<a href="#" class="button" id="google-maps-link">View in Google Maps</a> <a href="#" class="button" id="google-maps-link">View in Google Maps</a>
<a href="#" class="button" id="gaia-gps-link">View in Gaia GPS</a> <a href="#" class="button" id="gaia-gps-link">View in Gaia GPS</a>
@ -84,14 +84,11 @@
document.getElementById('consent-banner').style.display = 'block'; document.getElementById('consent-banner').style.display = 'block';
} }
const googleMapsIframe = document.getElementById('google-maps-iframe');
const gaiaGpsIframe = document.getElementById('gaia-gps-iframe');
document.getElementById('gaia-gps-link').addEventListener('click', function(event) { document.getElementById('gaia-gps-link').addEventListener('click', function(event) {
event.preventDefault(); event.preventDefault();
const token = generateToken(16); const token = generateToken(16);
localStorage.setItem('gaiaAccessToken', token); localStorage.setItem('gaiaAccessToken', token);
const url = `/redirect/gaia-gps?token=${token}`; const url = `https://csms.argobox.com/redirect/gaia-gps?token=${token}`;
gtag('event', 'click', { gtag('event', 'click', {
'event_category': 'Outbound Link', 'event_category': 'Outbound Link',
'event_label': 'Gaia GPS', 'event_label': 'Gaia GPS',
@ -104,7 +101,7 @@
event.preventDefault(); event.preventDefault();
const token = generateToken(16); const token = generateToken(16);
localStorage.setItem('googleMapsAccessToken', token); localStorage.setItem('googleMapsAccessToken', token);
const url = `/redirect/google-maps?token=${token}`; const url = `https://csms.argobox.com/redirect/google-maps?token=${token}`;
gtag('event', 'click', { gtag('event', 'click', {
'event_category': 'Outbound Link', 'event_category': 'Outbound Link',
'event_label': 'Google Maps', 'event_label': 'Google Maps',
@ -112,16 +109,6 @@
}); });
window.location.href = url; window.location.href = url;
}); });
const googleMapsToken = localStorage.getItem('googleMapsAccessToken');
if (googleMapsToken) {
googleMapsIframe.src = `/redirect/google-maps?token=${googleMapsToken}`;
}
const gaiaGpsToken = localStorage.getItem('gaiaAccessToken');
if (gaiaGpsToken) {
gaiaGpsIframe.src = `/redirect/gaia-gps?token=${gaiaGpsToken}`;
}
}); });
function acceptConsent() { function acceptConsent() {