[SalesForce] Pass parameter in the Landing page URL

I'm a new user of Salesforce. I'm creating a landing page, and i want to pass parameter such as User name in the URL of the landing page.

I tried this:

mypage.com/wsmetxah3zh?&name=%%=v(@Firstname)=%%&email=%%=v(@emailaddr)=%%

and when i display the parameters in the landing page, for exemple :

<p>%%=v(name)=%%</p>

it doesn't work. If any one can help me i will appreciate this. Thank you.

Best Answer

You have to use ConCat AmpScript function to add the parameter in the landing page.

%%[ 
     SET @Firstname = "Johan" 
     SET @emailaddr = "Johan@test.com" 
     SET @URL = ConCat('http://mypage.com/wsmetxah3zh?&name=',@Firstname,'&email=',@emailaddr) 
 ]%%
 <a href="%%=v(@URL)=%%">LandingPageURL!</a>

Also, use QueryParameter function to Retrieves the value from a query string based on the key defined for it.

 %%[ 
     SET @Name = QueryParameter("name")
  ]%% 

  FirstName = %%=V(@Name)=%%