How to track personalized links in Message center emails

Avatar

Avatar

Amit_Kumar

MVP

Avatar

Amit_Kumar

MVP

Amit_Kumar
MVP

04-01-2018

Hi All,

I am unable to find some elegant way to track the dynamic URLs in message center emails. I know I can use http://<%=ctx.myURL%> pattern but this is not a recommended way because

  • Tidy can incorrectly patch some of the links, which can happen randomly. The typical symptom is a piece of HTML that is visible in the email proofs but not in the preview.
  • Escaping from the URL is problematic, some characters in the URL can cause problems.
  • You cannot have a parameter named ID conflicting with a parameter in the redirection URL.
  • The interest of tracking is then limited to statistics on the delivery, as Adobe Campaign indifferently tracks all possible values of "myURL."

What should I do to enable the tracking now?

Regards,

Amit

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jean-Serge_Biro

MVP

Avatar

Jean-Serge_Biro

MVP

Jean-Serge_Biro
MVP

15-01-2018

Hi Amit,

I am not sure that the issue with "bad encoding" is due to Message Center instance or not. But most of time, because of character set used.

Please note that the JSAPI escapeUrl function mentions this:

The function complies with the RFC1738 specification and only allows you to encode ISO-Latin characters.

To encode UTF-8 characters, use the encodeURIComponent() JavaScript function.

And the standard Javascript function encodeURI() is different from encodeURIComponent() for some specific characters:
JavaScript encodeURI() Function

Having a quick look on google with "tidy escape url", some articles mentions the same issue with Tidy tool for UTF8 characters (if not ANSI chars, and people often mislead ANSI and Win1252 and ISO8859P1, not the same).

So please, check the character set of your parameter myURL, and the underlying table encoding charset (utf8 utf16 win1252 iso8859P13 etc etc). 

Regards

J-Serge

Answers (4)

Answers (4)

Avatar

Avatar

Amit_Kumar

MVP

Avatar

Amit_Kumar

MVP

Amit_Kumar
MVP

15-01-2018

Hi J-Serge,

Thanks for the reply!!

URL will be completely different from time to time, and this URL be a complete URL and with the protocol and query string parameters.

I know The URLs are detected by Adobe Campaign if they start with:

"<%@"

"<!--"

"[protocol]://"

In my case, I can only use "[protocol]://" for message center emails as first two are not supported in message center emails(or I don't know a way to use it)

https://<%=escapeUrl(String(ctx.myURL).substring(String(ctx.myURL).indexOf('//')+2, String(ctx.myURL).length))%>

this solution works most of the time, but sometimes I am receiving some weird symbol in the request or query string param as "ID" and "h" which doesn't work.

I thought if you can provide me some way to use any of "<%@" or "<!--" option to use this in message center it would solve my purpose.

I can see Adobe also added some warnings for above method here:

How to track personalized links in emails

Cheers!

Amit

Avatar

Avatar

Jean-Serge_Biro

MVP

Avatar

Jean-Serge_Biro

MVP

Jean-Serge_Biro
MVP

10-01-2018

Hi Amit,

Sorry, I don't understand perfectly the concerns.


What does mean "dynamic URL" in your context?

URL with same path (urlbase) but with different parameters or parameters values?

URL completely different from time to time?

Escaping URL is convenient for me, thanks to the JSAPI escapeUrl function. But you seem unhappy with the escapeUrl function, please may you give an example of bad behavior, perhaps some character set or special character involved?

Usually, it is up to customer to transform the parameters to use for the links of the template email containing parameters having special characters to encode.

If all the url including the parameters are provided by the SOAP call parameters (except the protocol http:// or https:// for tracking reasons), then you must escapeUrl all this parameter/URL. In that case please try this:
http://<%=escapeUrl(ctx.myURL)%>

But because you mention that escaping URL generates issue, probably for some special characters, the encoding is not valuable.

Regarding the point "You cannot have a parameter named ID conflicting with a parameter in the redirection URL", I didn't know such limitation because all my parameters are different from id parameter name, but I understand the reason.
If you can't manage a different parameter name ID for the rtEvent parameters, the only solution I see would be to modify the xtk.options (menu Administration/Platform/Options) NmsTracking_ClickFormula code, in order to allow this "feature". But it is a factory code, so it is not safe to modify/replace, and if you apply a build your change could be overwritten. So I recommend to create another option by duplicating NmsTracking_ClickFormula, then in your delivery Tracking properties, you replace the NmsTracking_ClickFormula by your customized one.
But I think it is too tricky anyway and risky, it is far easier to manage with the source SOAP calls to replace the ID parameter by myID name...

Regards
J-Serge

Avatar

Avatar

Amit_Kumar

MVP

Avatar

Amit_Kumar

MVP

Amit_Kumar
MVP

10-01-2018

Jean-Serge Biron what do you think about it, any recommendations?

Avatar

Avatar

florentlb

Total Posts

1.1K

Likes

234

Correct Answer

239

Avatar

florentlb

Total Posts

1.1K

Likes

234

Correct Answer

239
florentlb

09-01-2018

Hi Amit,

Besides the recommendations from the post in which you pinged me, I don't know.

Maybe Vipul Raghav​ will have some more insights on this?

Florent