I am currently in the process of building a collection page for exchange reviews on my website. Users have the option to navigate to a specific company’s page and create an account through my affiliate link.
To ensure a smooth user experience and minimize churn rates when redirecting to the external website, I have implemented an intermediary redirect page. When a user clicks on the ‘Create Account’ button on the review page, they are first directed to an internal redirect page. This page informs them that they will be redirected to the external website in a few seconds.
My challenge lies in passing two URL parameters to this redirect page, which I’m loading from the CMS: the external URL of the company and the company’s name. Despite my attempts using the following format: https://companyname.com/redirect?exchange={{Company Name}}&url={{Company External URL}}, the CMS fields do not seem to be loaded or passed to the redirect page.
Could anyone kindly guide me on how to effectively pass these two URL parameters to the redirect page? Your insights and assistance would be greatly appreciated.
This should be fairly straight forward. Since you are using a button…
Use a form block with only a button and no fields (delete everything except the button).
Add the interstitial page URL to the forms “Action” field.
Change the method to “GET” for the form block.
Add an Embed element to the form.
Add 2 hidden input fields that are bound (using the “Add field” link) to these fields.
Example:
<input type="hidden" name="company-name" value="{field value bound from CMS}">
Now, when you submit the form, you will get your hidden values appended to the URL.
If that doesn’t fully meet your needs then you’ll need to go the custom code route.
You’ll need to write those 2 CMS fields to your page (they can be hidden or displayed), use some Javascript (custom code) to grab those values, and the JS to append them to a URL. Then your JS again can redirect the page for you.
Another option to help with that, and depending on what you’re trying to do, is taking advantage of tools like Attributes by Finsweet, dig into this as see if you can use it to your advantage: CMS Attribute.