You’ll need to use psychoJS.setRedirectUrls(myCompletedURL, myCancelledURL) to change the location once the experiment starts.
psychoJS.setRedirectUrls(myCompletedURL, myCancelledURL)