Avatar

Correct answer by
Employee Advisor

I've changed my approach given the issues faced with using personalization blocks and now everything is working correctly. Given that I still required a centralized repo, I used platform options to store the utm logic

 

David__Garcia_0-1636772876861.png

And since my templates were being generated on the back of an API call using content templates, I decided to execute the logic stored as string on the platform options in during the generation of the publication template.

 

  var x =  getOption("utm_privateclients");
  var utm = Function('return '+x)();  

David__Garcia_1-1636773154295.png

and now the utm structure is appended to the link of the article at the point of generating the delivery template and no need for personalization block this way

David__Garcia_2-1636773303362.png

and in my javascript template i just use the content link without adding the personalization block anymore

David__Garcia_3-1636773424366.png

 

View solution in original post