We need to automatically redirect a page to a new link after 10 seconds. I attempted to add the code to the head section in the settings of the landing page, but not working.
"Redirect Error
It looks like some code on your page caused a redirect to an unexpected URL, preventing the editor from working properly. Please wrap any javascript redirect code on your page with editor check conditionals. See the knowledge base for more information."
if you’re putting the script into the head section in the settings the script will be executed inside the page builder which will lead to the error you’ll see.
You can wrap it in a simple if/unless statement like this
The redirect works properly when using the URL (Thank You Page), but in HubSpot, I always receive an error message stating that the page has been blocked by Chrome. Is this normal?
Hi @znajem, do you mean inside the page-editor?
If so - yes it’s normal because you’re trying to open a non HubSpot page inside HubSpot which is not possible.
Also you might want to put the redirect script to the external page if you’re redirecting from HubSpot to somewhere else