0

I'm using CloudpagesURL(xxxx) in an email to link to a SFMC Cloud Page when the CTA is clicked.

How can I get the first and last name of the email recipient in the cloudpage with SSJS? Do I have to pass them along from the email in the CloudPagesURL(xxxx) and then retrieve once in the Cloud Page?

None of the recipients are on a publication list (I assume I cannot use any of the subscriber functions in the SSJS documentation).

2 Answers 2

0

You don’t need SSJS to achieve this. I will assume you have a main Data Extension where all your contacts are present. You could pass the Subscriber Key in your CloudPagesURL and use the Lookup function to retrieve name and other fields you might find necessary from that Data Extension.

2
  • 1
    Thank you Lucas - I'm going to do the same thing you suggested but use the SSJS functions to look them up in the DE. :-) I have to use SSJS anyways because I have a custom form that I need to pull data from to update the DE the recipient are on. Commented Oct 8, 2018 at 20:42
  • You are welcome, Paulette. Remember to mark the answer as accepted Commented Oct 11, 2018 at 10:54
0

I find it's easier to set them in Ampscript when the page loads by doing as Lukas said - pass the subscriber key in (I'd recommend using Base64 to encode it, then decode on the page) and then use Lookup to find the first and last names from whichever DE you have them saved in.

You can then set these variables and retrieve them within your SSJS form using GetValue.

You must log in to answer this question.

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