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).

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.

  • 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. – Paulette Vallad Oct 8 '18 at 20:42
  • You are welcome, Paulette. Remember to mark the answer as accepted – Lukas Lunow Oct 11 '18 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.

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.