Just have a blank page and write it into the page onReady function, something like this.
import wixLocation from 'wix-location';
$w.onReady( () => {
wixLocation.to("http://wix.com");
}
Or just add it to a element on the page and either use the Wix Editor settings to link it to an external website or use code to direct it to a external website.
export function song_onclick(event) {
wixLocation.to("http://wix.com");
}
// With the properties panel onClick event handler.
$w("#song").onClick( (event) => {
wixLocation.to("http://wix.com");
}
// With the onClick event handler written into the code.