Redirecting your Raisely campaign
If you've finished your Raisely campaign, you can either close the campaign to take it offline or add a redirect to another campaign or your main donation page.
Follow these steps to add a redirect for your whole campaign:
- Go to Settings > Apps & Integrations and turn on Custom Javascript (Advanced)
- In the "Custom Code" box enter the following:
const current_path = window.location.pathname; if (current_path === "/") { window.location.replace("https://example.com"); }
Replace http://example.com/ with the URL you would like to redirect the campaign to.
- Press Save
Once you've done that, load your page to confirm the direct is working. There may be a brief flash where you see your campaign before the redirect kicks in.
Multiple redirects
You can also redirect more than one URL to your new campaign.
Follow these steps to add a list of URL redirects:
- Go to Settings > Apps & Integrations and turn on Custom Javascript (Advanced)
- Enter the following snippet in the "Custom Code" box
const current_path = window.location.pathname; const paths = [ "/path-one", "/path-two" ]; if (paths.includes(current_path)) { window.location.replace("https://example.com"); }
- Replace /path-one and /path-two with your own paths
You can add more paths to the list, just add a comma to all paths except the final one listed - Replace https://example.com with the URL you would like to redirect the campaign to
- Press Save