I have customer data in a Data Extension. I am sending an email to the customers where there is a link to a cloudpage.

When the user clicks a cloud page link...he is redirected to the cloudpage where there is a feedback form. The feedback form must have pre-populated data in some of the fields. How do I pre populate the fields.

Can anyone give me an example?


2 Answers 2


You can use CloudPagesURL to pass variables to a CloudPage. The link is built like this, where you can pass an arbitrary number of parameters:

<a title="Some page" 
alias="Some page">
Click to go there

You must replace 123 with the ID of your Cloud Page. You can find the CloudPageID under Page Properties:

See CloudPage ID

Within the Cloud Page, you should use the AttributeValue to get the parameters passed on from CloudPagesURL:

SET @X = AttributeValue("VariableX")
  • Hi Lukas, do you know if there are any reserved keywords for attributeValue? I have this approach in place but unfortunately only one of three (the last) parameter of the cloudpagesurl function returns a value when i receive it via attributevalue. The parameters i set are called "language" and "country" and a value like "blabla". Only blabla returns a value when we set the cloudpagesurl like CloudPagesURL(4404,'language',@customer_language,'country',@customer_country,'blabla',@blabla) Commented Nov 18, 2019 at 16:55
  • and retrieve like this set @customer_country = AttributeValue('country') set @customer_language = AttributeValue('language') set @blabla = AttributeValue('blabla') Commented Nov 18, 2019 at 16:56

MarketingCloud passes encrypted subscriber information through email links to CloudPages. Should be in a ?qs=21381648t7qdg format. So, you can just retrieve the subscriberkey from that encrypted string via ampscript at the top of your CloudPage

Here's a starting example:

 /* Get the Id of the account */ set @mid = [memberid]

 /* Get the key */ set @subKey = AttributeValue("_subscriberkey") /*if
 empty, pull from different param in URL*/ if empty(@subKey) then set
 @subKey = AttributeValue("sk") endif /*if empty, pull from form
 field*/ if empty(@subKey) then set @subKey =
 requestparameter("_subscriberkey")  endif

 /*Set the Data Extension in MC*/ set @de = 'Preference_Center'
  • 2
    Actually I prefer using CloudPagesURL in this scenario, since all the parameters (including SubscriberKey) are passed "behind the scenes" and hence hidden from the recipient. Commented Feb 12, 2019 at 16:08
  • how to use cloud pages url...can you give me an example?? Commented Feb 13, 2019 at 6:47

You must log in to answer this question.

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