Skip to content

Commit

Permalink
fix links (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
ail3ngrimaldi authored May 8, 2024
1 parent 8b2fbfc commit 744ed13
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
12 changes: 8 additions & 4 deletions a/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,17 @@ ul li, .auto-grid li { display: flex; align-items: center; }


<script>
window.amplitude.track(`view:landing:a`);
window.document.onload = () => { window.amplitude.track(`view:landing:a`); }
let cta = document.querySelector(".track-cta");
cta.addEventListener('click', () => {
let cta = document.querySelectorAll(".track-cta");
cta.forEach((c) => {
c.addEventListener('click', () => {
let newWindow = window.open();
let searchParams = new URL(window.location.href);
window.amplitude.track(`landing:a:click-apply`);
window.open(`https://apply.virto.network${searchParams.search}`, '_blank');
let url = `https://apply.virto.network${searchParams.search}`;
newWindow.location = url;
})
});
const $ = document.querySelector.bind(document),
Expand Down
20 changes: 12 additions & 8 deletions b/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,18 @@ ul li, .auto-grid li { display: flex; align-items: center; gap: 1.75em; }


<script>
window.amplitude.track(`view:landing:b`);
let cta = document.querySelector(".track-cta");
cta.addEventListener('click', () => {
let searchParams = new URL(window.location.href);
window.amplitude.track(`landing:b:click-apply`);
window.open(`https://apply.virto.network${searchParams.search}`, '_blank');
});
window.document.onload = () => { window.amplitude.track(`view:landing:a`); }
let cta = document.querySelectorAll(".track-cta");
cta.forEach((c) => {
c.addEventListener('click', () => {
let newWindow = window.open();
let searchParams = new URL(window.location.href);
window.amplitude.track(`landing:b:click-apply`);
let url = `https://apply.virto.network${searchParams.search}`;
newWindow.location = url;
})
});
const $ = document.querySelector.bind(document),
$$ = document.querySelectorAll.bind(document);
Expand Down

0 comments on commit 744ed13

Please sign in to comment.