I am building a custom preference/unsubscribe center in Cloud Pages with SSJS.

I'll be using MicrositeURL('xxxxxx') within the footer of emails to get to the landing page. How can I retrieve the SubscriberKey, JobID, and BatchID from the passed subscriber info to use in my SSJS calls?

1 Answer 1


You should used the RequestParameter ampscript function


SET @SusbcriberKey = RequestParameter('_subscriberKey')
SET @JobId = RequestParameter('jobID')
SET @BatchId = RequestParameter('batchId')


To do this via SSJS, you would need the GetAttributeValue function


<script runat=server>
  var subscriberKey = Platform.Variable.GetAttributeValue('_subcriberkey');
  • is there a way to do it without using ampscipt? Commented Mar 19, 2018 at 17:56
  • You could use SSJS.
    – 0xsegfault
    Commented Mar 19, 2018 at 17:57
  • @PauletteVallad updated my answer
    – 0xsegfault
    Commented Mar 19, 2018 at 18:02
  • 1
    you're missing platform load library in your code @Data_Kid Commented Mar 19, 2018 at 22:36
  • no worries @Data_Kid Commented Mar 19, 2018 at 22:46

You must log in to answer this question.

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