Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

how can I custom tranking link in delivery

Avatar

Level 2

I want costom my tracking label in ACM delivery, and I see below article, but I'm not sure how can I add an extra script array of the delivery

I try to add the array ang got below pic error. how can I add the array articleList?

The solution is to:

  1. Pre-load all the possible articles in an extra script array of the delivery - articleList[] - which means there must be a finite number of possible articles.

  2. Write a JavaScript function at the beginning of the content.

    <%@ value object='startScript' %>
    function displayArticle(articleId)
    {
      <%@ foreach object="articleList" item="article" %>
        if( articleId == <% value object="article" xpath="@id" %> ) 
        {
          <%@ value object='endScript' %>
            <a href="http://nl.net?a.jsp?article=<%@ value object="article" xpath="@id" %>">article</a>
          <%@ value object='startScript' %>
        } 
      <%@ end @%>
    }
    <%@ value object='endScript' %>
  3. Display the article by calling the function.

    <%
    for(var i=0; i<recipient.rcpArticle.length; i++ )
    {
     displayArticle(recipient.rcpArticle[i].article.@id)
    }
    %>

Andy123321_0-1637157926705.pngAndy123321_1-1637157949324.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 6

Not sure to understand fully the need.
On my side, I prefer to use an array in JSON and to loop directly in the delivery in order to build the HTML:
javascript is prohibited in emails, at least, for deliverability purpose

View solution in original post

1 Reply

Avatar

Correct answer by
Level 6

Not sure to understand fully the need.
On my side, I prefer to use an array in JSON and to loop directly in the delivery in order to build the HTML:
javascript is prohibited in emails, at least, for deliverability purpose