0

I am sending an email to subscribers with a coupon and the user info is in the email. This part works fine. I have set up a print coupon button which takes the subscriber to a landing page in Exact Target using "MicrositeUrl(XXXXXXX). Then I have a snippet of JavaScript code to redirect to a print screen. Everything works except the subscriber info does not show on the coupon in the print screen. How do I link my DE to pre-populate the landing page? I am a little new to the Ampscript code.

3

As part of passing values from DE to your landing page. There is two ways of doing this.

  1. Pass the necessary parameters in the Microsite URL within an email - when user clicks the link the values will be passed into the landing page and a RequestParameter can be used to grab the values.

Note: Any values from the sendable DE which you're using to send email can be passed on as a parameter to your landing page. Sample code.

%%=MicrositeURL(PageID, 'SubscriberKey', _subscriberkey, 'Email', emailaddr, 'Parameter1', 'DE_Field')=%%

%%[RequestParameter('your_parameters')]%%
  1. You can also do a Lookup on the DE where the subscriber information is. The Lookup is set on the landing page which will do a RequestParameter call on _subscriberkey or emailaddr. Using these values the subscriber info can be pulled in from the DE.

%%=Lookup("your_DE","column_to_return","column_to_identify","value_to_match")=%%

Here is the specific solution to your question:

For Email:

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <!--%%[ /* Set Up Android, Apple, Print URLs */ SET @promo_cd = '77WC1701' SET @PrintURL = MicrositeURL('xxxxxxx','first_name', first_name,'last_name',last_name,'vin',vin) ]%%-->
</head>

<body> <a href='%%=RedirectTo(@PrintURL)=%%'> <img src='image.mimet.mmsa.com/lib/fe6a15707664007e771c/m/5/…; style='display:inline-block;border:0;border:none;'></a> </body>

</html>

For Landing Page

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <!--%%[

    SET @first_name = RequestParameter('first_name')
    SET @last_name = RequestParameter('last_name')
    SET @vin = RequestParameter('vin')

    ]%%-->
</head>

<body> 

<p>Here is the output:</p>
<p>%%=v(@first_name)=%%</p>
<p>%%=v(@last_name)=%%</p>
<p>%%=v(@vin)=%%</p>

</body>

</html>
  • Hi Brad, Here is my test email code. <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <!--%%[ /* Set Up Android, Apple, Print URLs */ SET promo_cd = "77WC1701" SET PrintURL = MicrositeURL('xxxxxxx',"first_name", first_name,"last_name",last_name,"vin",vin) ]%%--> </head> <body> <a href="%%=RedirectTo(PrintURL)=%%"> <img src="image.mimet.mmsa.com/lib/fe6a15707664007e771c/m/5/…" style="display:inline-block;border:0;border:none;"></a> </body> </html> – David Mc Aug 2 '17 at 13:51
  • Not sure I did this correctly. so I want you to take a peek at it. Like I mention this Ampscript thing is a new to me. Thanks for your help! – David Mc Aug 2 '17 at 13:59
  • I have updated the answer above. Please upvote and accept the answer if it helps. – Brad Sapkota Aug 3 '17 at 1:01

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.