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
What should I do to enable the tracking now?
Regards,
Amit
Solved! Go to Solution.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
Jean-Serge Biron what do you think about it, any recommendations?
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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
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
Views
Replies
Total Likes