Skip to content

Commit

Permalink
Fix: parameters not working. (#171)
Browse files Browse the repository at this point in the history
* add first landing copys

* Add copys for landing-b and landing-c

* small changes on landing-a

* Update copys landing-b

* Add landing-c

* Add simple analytics

* add params to send info to different tables

* Add form link

* Fix: Alternative landings compile

* move icons

* update config file name

* update styles and fix errors

* fix mistaken permalink, layout and route

* update logos' path

* update config file name

* fix link url for first cta

* Pass b parameter to URL
  • Loading branch information
ail3ngrimaldi authored Aug 28, 2024
1 parent e87029f commit 3284519
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
29 changes: 15 additions & 14 deletions landings/a/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,25 @@ ul li, .auto-grid li { display: flex; align-items: center; }


<script>
let url = new URL(window.location.href);
url.searchParams.set('b', 'b-one');
let url = new URL(window.location.href);
window.history.pushState({}, '', url);
url.searchParams.set('b', 'b-one');
window.document.onload = () => { window.amplitude.track(`view:landing:a`); }
window.history.pushState({}, '', url);
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`);
let url = `https://apply.virto.network${searchParams.search}`;
newWindow.location = url;
})
});
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).searchParams;
window.amplitude.track(`landing:a:click-apply`);
let url = `https://waitlist.virto.network/?b=${searchParams.get('b')}`;
newWindow.location = url;
})
});
const $ = document.querySelector.bind(document),
$$ = document.querySelectorAll.bind(document);
Expand Down
11 changes: 6 additions & 5 deletions landings/b/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,13 @@ window.history.pushState({}, '', url);
window.document.onload = () => { window.amplitude.track(`view:landing:b`); }
let cta = document.querySelectorAll(".track-cta");
cta.forEach((c) => {
c.addEventListener('click', () => {
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}`;
let searchParams = new URL(window.location.href).searchParams;
window.amplitude.track(`landing:a:click-apply`);
let url = `https://waitlist.virto.network/?b=${searchParams.get('b')}`;
newWindow.location = url;
})
});
Expand Down
14 changes: 7 additions & 7 deletions landings/c/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ window.document.onload = () => { window.amplitude.track(`view:landing:b`); }
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;
})
});
let newWindow = window.open();
let searchParams = new URL(window.location.href).searchParams;
window.amplitude.track(`landing:a:click-apply`);
let url = `https://waitlist.virto.network/?b=${searchParams.get('b')}`;
newWindow.location = url;
})
});
const $ = document.querySelector.bind(document),
$$ = document.querySelectorAll.bind(document);
Expand Down

0 comments on commit 3284519

Please sign in to comment.