Each Geo Redirect service you create in our system will come with its own javascript code snippet.
This piece of javascript code needs to be placed into your Hubspot site only once. It does not need to be updated if any changes are made to the redirect settings.
Steps (for running redirect on all pages):
Click on the Settings icon in the main navigation bar
In the left sidebar menu, navigate to Website > Pages
Click the Modifying dropdown menu and choose the domain you want to update
Paste the JavaScript code provided in the Site Header HTML box
Ensure the code is pasted on line 1 of the box before any other scripts. It must be the first code to execute
Click on Save
Steps (for running redirect only on a selected page):
Navigate to your page
Hover over the page and click Edit
In the page editor, click the Settings tab
Click Advanced Options to open the Advanced Code Snippets
Paste the JavaScript code provided in the Head HTML box
Ensure the code is pasted on line 1 of the box before any other scripts. It must be the first code to execute.
Click on Update
More information regarding adding scripts in Hubspot can be found here