Streaming live at 10am (PST)

Placement of my JavaScript


Hello People,

So i decided to create a page that when visited, redirects to another external URL selected from an array.

My code looks like in the attached file.code

My question is, where should I place this code on my “/random-page” for this to work in Webflow.
(Also, if you spot any errors in the code, please let me know).

Thank’s in advance!


I’d put this in Page Footer Code (before /body tag)

var links = [
window.location = links[Math.floor(Math.random() * links.length)];

Also, feel free to contact me for further code help and/or customization of third-party plugins


Thank you very much @samliew that worked great!