Highlighted

Append a crypted string to ALL CLICKED URL in NmsTracking_ClickFormula

salvdangelo

19-04-2018

Hi,

I would like to append a string to all clicked tracked URL in NmsTracking_ClickFormula

<% if( typeof strPurlTrackingServer!="undefined" && strPurlTrackingServer.toString() ) { %><%= strPurlTrackingServer %><% } else { %><%@ include option='NmsTracking_ServerUrl' %><% } %>/r/?id=<%= type.substr(0, 1) + (message.id,<%@ value object="delivery" xpath="@idTracking" %>,<%= escapeUrl("$(urlId)") %><% if (document.mode == "forward") {   var d = message.getParameter("d")   if( d )     d = d.split(",") %>&ap_visitorId=<%=message.getParameter("visitorId") != '' ? message.getParameter("visitorId"):0 %>&ap_category=<%= d[0]?d[0]:'' %>&ap_deliveryId=<%=d[1]?parseInt(d[1],16):0%><% } %><% if( typeof proposition != "undefined" && proposition.length == undefined ) { %>&ap_oid=<%= proposition.offer.id %><% } %>&email=<%@ include view='cryptoJs' %>

where 'cryptoJs' is a personalization block where is implemented a custom encryption algorithm like this:

<%cryptUrlAES = function(){

...

return output;

}

cryptUrlAES ();

%>

The problem is that <%@ include view='cryptoJs' %> is always empty.

Anyone could tell me why and I can I solve?

NOTE: the encryption algorithm was tested in a javascript code and is working


Thanks in advance,
Salvatore

Jean-Serge Biron

inactiveforumnotifier

Amy_Wong

Woojin

clawson

jwarren

Adobe Campaign

Replies

Highlighted

Jean-Serge_Biro

MVP

20-04-2018

Buon giorno Salvatore,

I think personalisation blocks calls are not allowed/used in such location, but only in delivery and webApp.

Please may you try to replace directly by <%cryptUrlAES() %> or <%= cryptUrlAES() %> and define your Javascript code in a library in Administration/Settings/Javascript objects node?

Regards
J-Serge

Highlighted

davidk46719882

20-04-2018

your variable &email=<%= cryptUrlAES() %> should be after <%= escapeUrl("$(urlId)") %>

try this

<% if( typeof strPurlTrackingServer!="undefined" && strPurlTrackingServer.toString() ) { %><%= strPurlTrackingServer %><% } else { %><%@ include option='NmsTracking_ServerUrl' %><% } %>/r/?id=<%=

type.substr(0, 1) + (message.id<0 ? (message.id+4294967296) : message.id).toString(16).toLowerCase()

%>,<%@ value object="delivery" xpath="@idTracking" %>,<%= escapeUrl("$(urlId)") %>&email=<%= cryptUrlAES() %>

<%

if (document.mode == "forward")

{

  var d = message.getParameter("d")

  if( d )

    d = d.split(",")

%>&ap_visitorId=<%=message.getParameter("visitorId") != '' ? message.getParameter("visitorId"):0 %>&ap_category=<%= d[0]?d[0]:'' %>&ap_deliveryId=<%=d[1]?parseInt(d[1],16):0%><%

} %><%

if( typeof proposition != "undefined" && proposition.length == undefined )

{ %>&ap_oid=<%= proposition.offer.id %><%

} %>