I have a smart capture form that is capturing data for a competition we are holding. When the user submits the form it redirects to another cloudpage which has a little thank you message.

On this thank you page I have a link that says 'VISIT WEBSITE'. Because we have a global website, I'd like this link to be dynamic based on what the Country the user enters on the previous pages smart capture form.

Is this possible?

The Ampscript I would normally use is:

%%[SET @Region = "%%=Lookup('CloudPages_DataExtension','Country','EmailAddress',EmailAddress)=%%" 

Based on the value that returns I set all of the other variables, But this isn't working. I assume its because the data doesn't flow through to the data extension fast enough to be referenced. or it doesn't keep the email address entered from the previous page stored anywhere.

Any help to get around this would be greatly appreciated!


UPDATE 30/01

Thanks Vishal! I have been doing some more research and wondering if the easier method is to have the AMPscript written like this on my thank you page:

%%[SET @Region = "RequestParameter("Country")" 

@2XUBaseURL IF @Region == "United States"
THEN SET @2XUBaseURL = "https://www.website.com/us" 
@Region == "United Kingdom"
THEN SET @2XUBaseURL = "https://www.website.com/uk" 
@Region == "Sweden"
THEN SET @2XUBaseURL = "https://www.website.com/se" 
@Region == "New Zealand"
THEN SET @2XUBaseURL = "https://www.website.com/au" 
@Region == "Norway"
THEN SET @2XUBaseURL = "https://www.website.com/no" 
@Region == "Japan"
THEN SET @2XUBaseURL = "https://www.website.com/jp" 
@Region == "Finland"
THEN SET @2XUBaseURL = "https://www.website.com/fi" 
@Region == "Denmark"
THEN SET @2XUBaseURL = "https://www.website.com/dk" 
@Region == "Canada"
THEN SET @2XUBaseURL = "https://www.website.com/ca" 
@Region == "Australia"
THEN SET @2XUBaseURL = "https://www.website.com/au" 

ELSE SET @2XUBaseURL = "https://www.website.com/us" 


and on the redirect link from the entry page to have the URL set as:

%%=RedirectTo(CloudPagesURL(ID, 'Country', @Country))=%%

Will this work?

1 Answer 1


I would take this approach.

Step 01: Create a Non-sendable DE with respective country URLs as below. enter image description here

Step 02: Place the below AMPscript in your Thank you page.

    SET @country = RequestParameter("country")
    SET @URL  = Lookup("StackEX_demo_2020JAN29","URL","Country", @country)

    Dynamic URL = <a href="%%=RedirectTo(@URL)=%%" target="_blank">VISIT WEBSITE</a>

1)You can bring in all your Form fields to this page by using RequestParameter() method.
2) Change DE name within AMPscript
3) Update additional DE fields if required.
4) You can send additional parameters in your URL using Concat() method, if required.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .