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))%>
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.
I still get the same issue . it complains on Tracking URL
Views
Replies
Total Likes
Hi,
Please share your tracking URL you have specified in your delivery.
Code shared above is correct, it is working fine for me.
Thanks.
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>
Views
Replies
Total Likes
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>
Hello vendimb15716755,
Check how is the pair 'MirrorPageUr, MirrorPagel' made in personalization blocks.
Marcel
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
Views
Replies
Total Likes
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!
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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 ?
Views
Replies
Total Likes
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-
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!
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
Views
Replies
Total Likes
Views
Like
Replies
Views
Like
Replies
Views
Likes
Replies