'how can I redirect first timers on the website to the signup page?

Ok so basicly here is my script:

window.onload = () => {
    `enter code here`   if (**first_time**) {
           window.location.href = "www.netlify.app/teamadventures.signup";
       }
   }

I want to make it so that if it's your first time on the website you get taken to a signup page automatically. How do I do this with vanilla JS?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source