I want to send a double optin confirmation email with the link which leads to the "thank you" landing page. We deal with subscribers from different countries, so I would like to render language based on the value in the column "Language" in sendable DE. How should I place an AMPscript - only in email or also in the Landing Page?

I have tried already to put some code in LP, but I got an error when trying to preview it.

Thanks in advance!


What you should do is one of the following.

  1. Attach an URL-Parameter to the Link inside your email. Retrieve the parameter in the landing page with ampscript.
  2. Redirect with the ampscript function CloudPagesURL() to your landing page. Retrieve a unique identifier from that person by using AttributeValue towards personalization Strings of salesforce. Then use these strings to query a dataextension that holds your language value of that particular user.

Code in an email could look like this:

%%[ var @country, @language
set @country=  [country] /* when the dataextension column is named country */
set @language= [language] /* when the dataextension column is named language*/
set @cp_url = CloudPagesURL(4711) /* your cloudpage id */
set @cp_url_comb = Concat(@cp_url,"&country=",@country,"&language=",@language)


CloudpageURL Combined

<p><a title="MyPage" href="%%=RedirectTo(Concat(@cp_url,"?country=",@country,"&language=",@language))=%%" alias="ThisAlias" conversion="false">Redirect to test</a></p>

On a cloudpage it could look like this:

set @country= RequestParameter("country")
set @language= RequestParameter("language")
/* or retrieve the subscriberkey */
set @subscriberKey = AttributeValue("_subscriberkey")
/* and then do a lookup / lookuprows / lookupoderedrows towards a dataextension where all your subscribers are*/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.