diff --git a/landings/a/index.liquid b/landings/a/index.liquid index 53f6f06..43852a5 100644 --- a/landings/a/index.liquid +++ b/landings/a/index.liquid @@ -140,26 +140,26 @@ document.addEventListener('DOMContentLoaded', function() { }); let telegram = document.getElementById("telegram"); - telegram.addEventListener('click', (event) => { - event.preventDefault(); - let redirectUrl = new URL('https://t.me/+573107887042'); - const newWindow = window.open(redirectUrl, '_blank'); - amplitude.track('landing:a:click-telegram') - setTimeout(() => { - newWindow.location = redirectUrl.toString(); - }, 200) - }); - - let whatsapp = document.getElementById("whatsapp"); - whatsapp.addEventListener('click', (event) => { - event.preventDefault(); - let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); - const newWindow = window.open(redirectUrl, '_blank'); - amplitude.track('landing:a:click-whatsapp') - setTimeout(() => { - newWindow.location = redirectUrl.toString(); - }, 200) - }); + telegram.addEventListener('click', (event) => { + event.preventDefault(); + let redirectUrl = new URL('https://t.me/+573107887042'); + const newWindow = window.open(redirectUrl, '_blank'); + amplitude.track('landing:a:click-telegram'); + setTimeout(function() { + newWindow.location = redirectUrl.toString(); + }, 200); + }); + + let whatsapp = document.getElementById("whatsapp"); + whatsapp.addEventListener('click', (event) => { + event.preventDefault(); + let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); + const newWindow = window.open(redirectUrl, '_blank'); + amplitude.track('landing:a:click-whatsapp'); + setTimeout(function() { + newWindow.location = redirectUrl.toString(); + }, 200); + }); const $ = document.querySelector.bind(document); const $$ = document.querySelectorAll.bind(document); diff --git a/landings/b/index.liquid b/landings/b/index.liquid index 19959de..08c5015 100644 --- a/landings/b/index.liquid +++ b/landings/b/index.liquid @@ -140,28 +140,27 @@ document.addEventListener('DOMContentLoaded', function() { ctas.forEach((cta) => { cta.addEventListener('click', handleCtaClick); }); - - let telegram = document.getElementById("telegram"); - telegram.addEventListener('click', (event) => { - event.preventDefault(); - let redirectUrl = new URL('https://t.me/+573107887042'); - const newWindow = window.open(redirectUrl, '_blank'); - amplitude.track('landing:b:click-telegram') - setTimeout(() => { - newWindow.location = redirectUrl.toString(); - }, 200) - }); - - let whatsapp = document.getElementById("whatsapp"); - whatsapp.addEventListener('click', (event) => { - event.preventDefault(); - let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); - const newWindow = window.open(redirectUrl, '_blank'); - amplitude.track('landing:b:click-whatsapp') - setTimeout(() => { - newWindow.location = redirectUrl.toString(); - }, 200) - }); + let telegram = document.getElementById("telegram"); + telegram.addEventListener('click', (event) => { + event.preventDefault(); + let redirectUrl = new URL('https://t.me/+573107887042'); + const newWindow = window.open(redirectUrl, '_blank'); + amplitude.track('landing:b:click-telegram'); + setTimeout(function() { + newWindow.location = redirectUrl.toString(); + }, 200); + }); + + let whatsapp = document.getElementById("whatsapp"); + whatsapp.addEventListener('click', (event) => { + event.preventDefault(); + let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); + const newWindow = window.open(redirectUrl, '_blank'); + amplitude.track('landing:b:click-whatsapp'); + setTimeout(function() { + newWindow.location = redirectUrl.toString(); + }, 200); + }); const $ = document.querySelector.bind(document); const $$ = document.querySelectorAll.bind(document); diff --git a/landings/c/index.liquid b/landings/c/index.liquid index 083ced8..41b8072 100644 --- a/landings/c/index.liquid +++ b/landings/c/index.liquid @@ -148,27 +148,26 @@ document.addEventListener('DOMContentLoaded', function() { cta.addEventListener('click', handleCtaClick); }); - let telegram = document.getElementById("telegram"); - telegram.addEventListener('click', (event) => { - event.preventDefault(); - let redirectUrl = new URL('https://t.me/+573107887042'); - const newWindow = window.open(redirectUrl, '_blank'); - amplitude.track('landing:c:click-telegram') - setTimeout(() => { - newWindow.location = redirectUrl.toString(); - }, 200) - }); - - let whatsapp = document.getElementById("whatsapp"); - whatsapp.addEventListener('click', (event) => { - event.preventDefault(); - let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); - const newWindow = window.open(redirectUrl, '_blank'); - amplitude.track('landing:c:click-whatsapp') - setTimeout(() => { - newWindow.location = redirectUrl.toString(); - }, 200) - }); + telegram.addEventListener('click', (event) => { + event.preventDefault(); + let redirectUrl = new URL('https://t.me/+573107887042'); + const newWindow = window.open(redirectUrl, '_blank'); + amplitude.track('landing:c:click-telegram'); + setTimeout(function() { + newWindow.location = redirectUrl.toString(); + }, 200); + }); + + let whatsapp = document.getElementById("whatsapp"); + whatsapp.addEventListener('click', (event) => { + event.preventDefault(); + let redirectUrl = new URL('https://api.whatsapp.com/send?phone=573107887042'); + const newWindow = window.open(redirectUrl, '_blank'); + amplitude.track('landing:c:click-whatsapp'); + setTimeout(function() { + newWindow.location = redirectUrl.toString(); + }, 200); + }); const $ = document.querySelector.bind(document); const $$ = document.querySelectorAll.bind(document);