From a0d4a8ce538c8a86fe285f018b83faa2984f2b10 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Aug 2024 14:04:07 -0600 Subject: [PATCH] Update index.html --- index.html | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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 @@
- - + +