Avatar

Community Advisor

Hello @supratim320 

I'm not sure how you try to modify the content (and I can totaly misunderstand the problem...), but when I try to change a delivery html content, It works.

I'm not sure this is an urlconfig problem if I understand well (sorry Laurent) because the urlConfigs is calculated during the personalisation (for the tracking config generation) and might appears when the user want a preview of it (but will be recalulated after).

If I understand well, you want to delete all the utm parameter in the links into the HTML content before the preparation.

Can you give a try to the following code ?

var deliveryId = 123456789 //Replace with your deliveryId
var delivery = nms.delivery.load( deliveryId );
var newContent = delivery.content.html.source.toString().replace(/([?&])?utm=[^&"]*/gi,"");
delivery.content.html.source = newContent;
delivery.save();

This is a very global approach (because It replace all the "utm=xyz", not only in <a> links). I've just tested it and it works.

I'm afraid of misunderstanding your problem....

Let me know.

Cedric