From 5e8ef5f3284a142459cff4071ec220c50c824e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ail=C3=A9n=20Grimaldi?= <63558201+ail3ngrimaldi@users.noreply.github.com> Date: Thu, 12 Sep 2024 18:24:26 -0300 Subject: [PATCH] remove then due to errors with amplitude (#183) unable to test it on mobile --- landings/a/index.liquid | 12 ++++++------ landings/b/index.liquid | 12 ++++++------ landings/c/index.liquid | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/landings/a/index.liquid b/landings/a/index.liquid index cd87c40..d608ca1 100644 --- a/landings/a/index.liquid +++ b/landings/a/index.liquid @@ -175,9 +175,9 @@ document.addEventListener('DOMContentLoaded', function() { let redirectUrl = new URL('https://t.me/+573107887042'); const newWindow = window.open(redirectUrl, '_blank'); amplitude.track('landing:a:click-telegram') - .then(() => { - newWindow.location = redirectUrl.toString(); - }) + setTimeout(() => { + newWindow.location = redirectUrl.toString(); + }, 200) }); let whatsapp = document.getElementById("whatsapp"); @@ -186,9 +186,9 @@ document.addEventListener('DOMContentLoaded', function() { let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); const newWindow = window.open(redirectUrl, '_blank'); amplitude.track('landing:a:click-whatsapp') - .then(() => { - newWindow.location = redirectUrl.toString(); - }) + setTimeout(() => { + newWindow.location = redirectUrl.toString(); + }, 200) }); const $ = document.querySelector.bind(document); diff --git a/landings/b/index.liquid b/landings/b/index.liquid index ddc66f7..754565f 100644 --- a/landings/b/index.liquid +++ b/landings/b/index.liquid @@ -171,9 +171,9 @@ document.addEventListener('DOMContentLoaded', function() { let redirectUrl = new URL('https://t.me/+573107887042'); const newWindow = window.open(redirectUrl, '_blank'); amplitude.track('landing:b:click-telegram') - .then(() => { - newWindow.location = redirectUrl.toString(); - }); + setTimeout(() => { + newWindow.location = redirectUrl.toString(); + }, 200) }); let whatsapp = document.getElementById("whatsapp"); @@ -182,9 +182,9 @@ document.addEventListener('DOMContentLoaded', function() { let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); const newWindow = window.open(redirectUrl, '_blank'); amplitude.track('landing:b:click-whatsapp') - .then(() => { - newWindow.location = redirectUrl.toString(); - }); + setTimeout(() => { + newWindow.location = redirectUrl.toString(); + }, 200) }); const $ = document.querySelector.bind(document); diff --git a/landings/c/index.liquid b/landings/c/index.liquid index cda07a4..2bab838 100644 --- a/landings/c/index.liquid +++ b/landings/c/index.liquid @@ -168,9 +168,9 @@ document.addEventListener('DOMContentLoaded', function() { let redirectUrl = new URL('https://t.me/+573107887042'); const newWindow = window.open(redirectUrl, '_blank'); amplitude.track('landing:c:click-telegram') - .then(() => { - newWindow.location = redirectUrl.toString(); - }) + setTimeout(() => { + newWindow.location = redirectUrl.toString(); + }, 200) }); let whatsapp = document.getElementById("whatsapp"); @@ -179,9 +179,9 @@ document.addEventListener('DOMContentLoaded', function() { let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); const newWindow = window.open(redirectUrl, '_blank'); amplitude.track('landing:c:click-whatsapp') - .then(() => { - newWindow.location = redirectUrl.toString(); - }) + setTimeout(() => { + newWindow.location = redirectUrl.toString(); + }, 200) }); const $ = document.querySelector.bind(document);