referencing javascript library in personalized block issue with delivery template

Avatar

Avatar

vendimb15716755

Avatar

vendimb15716755

vendimb15716755

09-11-2019

HI

I am calling a javascript library into personalized block to do some URL parameter encryptions. That works fine when I preview the delivery template ( personalization) but when i try to use the delivery template to send out email fails with this error

JST -#ID# the result of the formula for the '<%LoadLibrary('URL in the '#ID#' delivery action is not valid . JST-#ID# failed to replace tracked URLs (content htmlContent)

this is the javascript on the personalized block

<%

  loadLibrary("wp:base64.js");

  var _email= recipient.email;

  var _id = recipient.id;

  var url = "id=" + _id + "&email=" + _email;

var main_url = "https://preferencestest.test.com";

%>

<%=main_url %>/Preferences/OptDown?params=<%=escapeUrl(Base64.encode(url))%>

Replies

Avatar

Avatar

vendimb15716755

Avatar

vendimb15716755

vendimb15716755

18-11-2019

Hi jyotiy43907700

did you get a chance to look at my response? I am still having issues . if the Tracking is enabled on template I am not able to pass the custom URL to the unsubscribe link. it breaks the deliver ( even though preview is fine on AC)

any help would be appreciated

Avatar

Avatar

vendimb15716755

Avatar

vendimb15716755

vendimb15716755

18-11-2019

HI @prasannam97453277

as I mention on my previous message if I disable tracking the email get delivered. Any other way to accomplish this via Personalized block or other variables ?

Avatar

Avatar

prasannakumarmarru

Avatar

prasannakumarmarru

prasannakumarmarru

18-11-2019

Hi,

It is not working when complete domain is upulled from personalization block. I used this as personalization block (TEST)-

<%

  loadLibrary("wp:base64.js");

  var _email= recipient.email;

  var _id = recipient.id;

  var url = "id=" + _id + "&email=" + _email;

%>

<%=escapeUrl(Base64.encode(url))%>

And used this in email ink-

1856738_pastedImage_3.png

It worked. Also you have params attribute as a part of url and adding id and email as parameters which would make something like this-

https://preferencestest.test.com/Preferences/OptDown?params=id="some id"&email="some email"

This link will not work even if teh delivery is deployed. Thanks!