[SalesForce] Can’t capture URL string attributes via RequestParameter()

Am trying to put the this link in a triggered email:

<a href="http://pages.exacttarget.com/page.aspx?QS=3935619f7de112efe7216b2b61beb90aceb7e386bfb7bcccdb7c20bb&subkey=%%_subscriberkey%%&demail=%%emailaddr%%&lkey=%%=v(@lkey)=%%&dname=%%=v(@dname)=%%&lemail=%%=v(@lemail)=%%&lstatus=1">Yes status 1 confirmed< /a>

This link leads to a landing page, where I am trying to get the passed values. I can see the values in URL, but I can't access it in the landing page.

In the landing page I use:

%%[
 SET @clkey= RequestParameter('lkey')
 SET @csubkey= RequestParameter("subkey")
]%%
<p>yes: %%=v(clkey)=%%</p>
<p>%%=v(csubkey)=%%</p>

Also, how can i use MicrositeURL/microsite_base_url instead… to replace email link i used above…to pass parameters with the URL?

Best Answer

First, don't forget to prefix your AMPScript variables with an "@":

%%=v(@varname)=%%

If you use MicrositeURL() in your email, all of the subscriber attributes will be retrievable using the AttributeValue() function. In your email 77777 is the PageID of your landing page:

<a href="%%=MicrositeURL(77777)=%%">Landing Page URL</a>

Then in your landing page:

%%[

var @sk
set @sk = AttributeValue("_subscriberkey")

]%%

<p>SubscriberKey: %%=v(@sk)=%%</p>

More info:

MicrositeURL()

AttributeValue()

Related Topic