<article class="bg-racing-green text-white p-8 campaignbanner hidden text-center">
    <h3>Free Tickets !</h3>
    <p class="pt-2 text-xl">
        For everyone from <span class="campaignbanner__from"></span> - courtesy of TwentyThree you have 2 free tickets for VideoDays worth 99 Euro each.
        <br>
        Use the code "<span class="campaignbanner__voucher font-bold font-italic text-23"></span>” the next <span class="campaignbanner__countdown italic"></span> minuts
    </p>
    <a href="#signup" class="button">Signup</a>
</article>

<script>
    // Grap the banner
    const banner = document.querySelector(".campaignbanner");
    // grap where we come from - give us the vouchers from utm_source
    let url = new URL(window.location.href);
    let params = new URLSearchParams(url.search);
    let source = params.get("utm_source");
    if (source) {
        banner.classList.remove("hidden");
    }
    let voucher = "default";
    if (source == "twitter") {
        voucher = "VideoLove2021Twitter";
        from = "Twitter";
    } else if (source == "google") {
        voucher = "VideoLove2021google";
        from = "Google";
    } else if (source == "linkedin") {
        voucher = "VideoLove2021Linkedin";
        from = "LinkedIn";
    }
    // push it in
    document.querySelector(".campaignbanner__from").innerHTML = `${from}`;
    document.querySelector(".campaignbanner__voucher").innerHTML = `${voucher}`;
    // banner begone
    async function easeOut() {
        await new Promise(resolve => setTimeout(resolve, 1000));
        banner.classList.add("hidden");
    }
    /* countdown until banner closes: */
    const startingMinutes = 1;
    let time = startingMinutes * 60;
    setInterval(updateCounter, 1000);

    function updateCounter() {
        const minutes = Math.floor(time / 60);
        let seconds = time % 60;
        seconds = seconds < 10 ? "0" + seconds : seconds;
        document.querySelector(".campaignbanner__countdown").innerHTML = `${minutes}:${seconds} Minuts`;
        time--;
        time =
            time < 0 ?
            easeOut() :
            time;
    }
</script>
<article class="bg-racing-green text-white p-8 campaignbanner hidden text-center">
  <h3>Free Tickets !</h3>
  <p class="pt-2 text-xl">
    For everyone from <span class="campaignbanner__from"></span> - courtesy of TwentyThree you have 2 free tickets for VideoDays worth 99 Euro each.
    <br>
    Use the code "<span class="campaignbanner__voucher font-bold font-italic text-23"></span>” the next <span class="campaignbanner__countdown italic"></span> minuts
  </p>
  <a href="#signup" class="button">Signup</a>
</article>

<script>
// Grap the banner
const banner = document.querySelector(".campaignbanner");

// grap where we come from - give us the vouchers from utm_source
let url = new URL(window.location.href);
let params = new URLSearchParams(url.search);
let source = params.get("utm_source");

if (source) {
  banner.classList.remove("hidden");
}

let voucher ="default";
if (source == "twitter") {
  voucher = "VideoLove2021Twitter";
  from = "Twitter";
}else if (source == "google") {
  voucher = "VideoLove2021google";
  from = "Google";
}else if (source == "linkedin") {
  voucher = "VideoLove2021Linkedin";
  from = "LinkedIn";
}

// push it in
document.querySelector(".campaignbanner__from").innerHTML = `${from}`;
document.querySelector(".campaignbanner__voucher").innerHTML = `${voucher}`;

// banner begone
async function easeOut(){
  await new Promise(resolve => setTimeout(resolve, 1000));
  banner.classList.add("hidden");
}

/* countdown until banner closes: */
const startingMinutes = 1;
let time = startingMinutes * 60;
setInterval(updateCounter, 1000);

function updateCounter(){
  const minutes = Math.floor(time / 60);
  let seconds = time % 60;

  seconds = seconds < 10 ? "0" + seconds : seconds;

  document.querySelector(".campaignbanner__countdown").innerHTML = `${minutes}:${seconds} Minuts`;

  time--;
  time =
    time < 0
    ? easeOut()
    : time;
}
</script>
{
  "title": "Lorem ipsum dolor sit amet",
  "titlelong": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor",
  "text": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
  "date": "2. januar 2018",
  "data-small": "05/08/2019",
  "user": "Steve Jobs",
  "email": "steve@apple.com",
  "url": "https://test.dk",
  "streetaddress": "Rådhuspladsen 1",
  "zip": 1321,
  "city": "kbh",
  "phone": "+45 12 13 14 15",
  "labeltext": "Label",
  "linktext": "Click !",
  "items": [
    {
      "item": null,
      "title": "This is a title for an item",
      "url": "https://test.dk",
      "text": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod"
    },
    {
      "item": null,
      "title": "This is sanother title for another item",
      "url": "https://test.dk",
      "text": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod"
    },
    {
      "item": null,
      "title": "This is a third title",
      "url": "https://test.dk",
      "text": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod"
    }
  ],
  "sitename": "Lorem ipsum",
  "twitter": "foobar"
}

?utm_source=twitter ?utm_source=facebook ?utm_source=linkedin