I have an email which is sent using Rest API, this email receives a JSON Array, one element of which is a URL.

    "Plan Name": "ABCD",
    "URLLink": "xxxxxxxxx"
    "Plan Name": "PQRS",
    "URLLink": "yyyyyyy"

A HTML table is populated in the email using SSJS, by looping through the array and doing a write

Everything works perfectly, email renders just fine but the clicks on the URL do not get tracked because link wrapping has already occurred before the JS is processed.

What are my options to fix this issue with tracking?

1 Answer 1


I think if you wrap the URL with a RedirectTo function it will be tracked. However you will not be able to use this URL for Engagement Splits in Journey Builder, since any scripting will prevent this.

For reference:


  • If I use a Write, no matter what I do the link won't be wrapped as SSJS is processed last and any wrapping that needed to be done is already done. I was able to figure out a way to get around this issue. I will post an answer shortly
    – Santosh P
    Nov 12, 2020 at 12:58

You must log in to answer this question.

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