Hi Joe -
I have this working on a current project like this: Once the user submits the form on the “Optin/Promo” landing page, that form redirects to a “Thank You! Your eBook is on its way to your inbox” landing page. On the “Thank You” landing page add this script to the Javascript section (before body end tag) and update the URL you want your Thank You landing page to delay redirect to (you can adjust the delay time here: var delay = 10;):
<script>
(function(){
// Your URL
var url = 'https://www.yourpagetoredirectURLgoeshere';
// Delay before the redirect takes place, in seconds
var delay = 10;
window.setTimeout(function() {
window.open(url, '_parent');
}, delay * 1000);
})();
</script>
Hey Thancan,
I just implemented this code in the Javascript section, and it’s not working. I get a “wwww.myurl.com refused to connect” message. Any clue what’s up? I am redirecting to a url that is not connected as a domain on Unbounce. Could this be why?
Thanks!
Hi masterofnone -
You will need to have a “published/active” URL for this to work as a redirect. If your URL is published/active, then double-check that it is correctly pasted in the code above and that none of the semi-colons or anything else were accidentally deleted or copied over - it happens 🙂 Hope this helps.
Hi! Thanks so much … I published, and it is, indeed, working! I really appreciate your code and your reply!