0

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?

0

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:
https://developer.salesforce.com/docs/atlas.en-us.mc-programmatic-content.meta/mc-programmatic-content/ssjs_platformHTTPRedirectTo.htm

https://developer.salesforce.com/docs/atlas.en-us.mc-programmatic-content.meta/mc-programmatic-content/redirectto.htm

1
  • 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 '20 at 12:58

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.