Update index.html
This commit is contained in:
		
							parent
							
								
									ce329eeb4a
								
							
						
					
					
						commit
						d6d4ee3371
					
				
							
								
								
									
										29
									
								
								index.html
								
								
								
								
							
							
						
						
									
										29
									
								
								index.html
								
								
								
								
							|  | @ -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 src="https://csms.argobox.com/redirect/google-maps"></iframe> |     <iframe id="google-maps-iframe" src=""></iframe> | ||||||
|     <iframe src="https://csms.argobox.com/redirect/gaia-gps"></iframe> |     <iframe id="gaia-gps-iframe" src=""></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,11 +84,14 @@ | ||||||
|                 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 = `https://csms.argobox.com/redirect/gaia-gps?token=${token}`; |                 const url = `/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', | ||||||
|  | @ -101,7 +104,7 @@ | ||||||
|                 event.preventDefault(); |                 event.preventDefault(); | ||||||
|                 const token = generateToken(16); |                 const token = generateToken(16); | ||||||
|                 localStorage.setItem('googleMapsAccessToken', token); |                 localStorage.setItem('googleMapsAccessToken', token); | ||||||
|                 const url = `https://csms.argobox.com/redirect/google-maps?token=${token}`; |                 const url = `/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', | ||||||
|  | @ -109,6 +112,16 @@ | ||||||
|                 }); |                 }); | ||||||
|                 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() { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue