diff --git a/index.html b/index.html index cdd04b8..51d30ee 100644 --- a/index.html +++ b/index.html @@ -57,6 +57,22 @@ 'event_label': label }); } + + function isMobile() { + return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); + } + + function openGoogleMaps() { + trackButtonClick('Google Maps'); + const url = isMobile() ? 'comgooglemaps://?daddr=39.034084596004874,-105.30166849999999&zoom=15' : 'https://rebrand.ly/csmsgoogle'; + window.location.href = url; + } + + function openGaiaGPS() { + trackButtonClick('Gaia GPS'); + const url = isMobile() ? 'gaiagps://map?center=39.034084596004874,-105.30166849999999&zoom=15' : 'https://rebrand.ly/csmsgaia'; + window.location.href = url; + } @@ -68,8 +84,8 @@
- - + +