Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

referencing javascript library in personalized block issue with delivery template

Avatar

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile
vendimb15716755
Level 3

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
Boost 50
MVP
Jyoti_Y
MVP

Likes

88 likes

Total Posts

123 posts

Correct Reply

55 solutions
Top badges earned
Boost 50
Shape 1
Boost 5
Give Back 5
Give Back 3
View profile

Avatar
Boost 50
MVP
Jyoti_Y
MVP

Likes

88 likes

Total Posts

123 posts

Correct Reply

55 solutions
Top badges earned
Boost 50
Shape 1
Boost 5
Give Back 5
Give Back 3
View profile
Jyoti_Y
MVP

12-11-2019

You could try something like this:

<%

var _email= recipient.email;

  var _id = recipient.id;

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

var buffer = new MemoryBuffer();

  buffer.fromString(url);

var encryptedString= buffer.toBase64();

%>

<%=main_url %>/Preferences/OptDown?params=<%=encryptedString%>

Thanks.

Avatar

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile
vendimb15716755
Level 3

12-11-2019

I still get the same issue . it complains on Tracking URL

Error_Email.png

Avatar

Avatar
Boost 50
MVP
Jyoti_Y
MVP

Likes

88 likes

Total Posts

123 posts

Correct Reply

55 solutions
Top badges earned
Boost 50
Shape 1
Boost 5
Give Back 5
Give Back 3
View profile

Avatar
Boost 50
MVP
Jyoti_Y
MVP

Likes

88 likes

Total Posts

123 posts

Correct Reply

55 solutions
Top badges earned
Boost 50
Shape 1
Boost 5
Give Back 5
Give Back 3
View profile
Jyoti_Y
MVP

12-11-2019

Hi,

Please share your tracking URL you have specified in your delivery.

Code shared above is correct, it is working fine for me.

Thanks.

Avatar

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile
vendimb15716755
Level 3

12-11-2019

here is the link for unsubscribe and the image with tracking URL on delivery template

<a href="<%@ include view='wpKADUnsubscribeUrl'%>" name="HTML_preference_link" _label="HTML_preference_link" _type="optout" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #C41230;text-decoration: none;font-weight: normal;">  Unsubscribe  </a>

tracking.png

Avatar

Avatar
Give Back 5
Level 4
prasannakumarmarru
Level 4

Likes

51 likes

Total Posts

59 posts

Correct Reply

17 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Level 4
prasannakumarmarru
Level 4

Likes

51 likes

Total Posts

59 posts

Correct Reply

17 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
prasannakumarmarru
Level 4

13-11-2019

Hi,

Try this in personalization block-

<%

  loadLibrary("wp:base64.js");

  var _email= recipient.email;

  var _id = recipient.id;

%>

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

Content as-

<a href=https://preferencestest.test.com/"<%@ include view='wpKADUnsubscribeUrl'%>" name="HTML_preference_link" _label="HTML_preference_link" _type="optout" target="_blank" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #C41230;text-decoration: none;font-weight: normal;">  Unsubscribe  </a>

Avatar

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile
MarcelSzimonisz
MVP

13-11-2019

Hello vendimb15716755​,

Check how is the pair 'MirrorPageUr, MirrorPagel' made in personalization blocks.

Marcel

Avatar

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile
vendimb15716755
Level 3

13-11-2019

HI @prasanna

it still have a problem if I enable tracking. it doesnt like any of the javascript variable. Not sure why it works fine on preview but the tracking URL breaks the delivery

Avatar

Avatar
Give Back 5
Level 4
prasannakumarmarru
Level 4

Likes

51 likes

Total Posts

59 posts

Correct Reply

17 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Level 4
prasannakumarmarru
Level 4

Likes

51 likes

Total Posts

59 posts

Correct Reply

17 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
prasannakumarmarru
Level 4

14-11-2019

Have you enabled it or disabled? Try disabling it and see. Then we can identify if that is an issue with tracking or without. The error is saying that it is failed to replace tracked urls. If this is not working even after disabling the tracking , probably raise a support ticket and we can guide you there.

Thanks!

Avatar

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile
vendimb15716755
Level 3

14-11-2019

yes I tried and is working. When I disable the tracking it works. I want to do the tracking though as we need to get the clicks tracked.