Some e mail marketing campaign ship outs can have hyperlinks dynamically rendered within the content material. Such hyperlinks will not be seen by Adobe Marketing campaign personalization engine and thus is not going to be tracked.
The nice factor is that we will use a workaround to make dynamic hyperlinks trackable and likewise on high of all workarounds Adobe itself has offered function that solves this problem.
Dynamic hyperlinks monitoring workaround
As we already know Adobe Marketing campaign solely sees hyperlinks which can be current within the e mail content material, which means they aren’t offered as variable or printed to the e-mail in loop dynamically.
To make dynamic hyperlinks works there isn’t any different means the best way to make them seen for monitoring then to dynamically write them to the e-mail content material earlier than the supply is executed. One of the best ways the best way to obtain that is to make use of personalization block and alter its content material dynamically earlier than supply exercise within the workflow.
And naturally don’t forget to refer that personalization block within the supply template.

var personalizationBlock= NLWS.nmsIncludeView.load(personalizationBlockId),//main key of personalization block html=""; //generate content material and reserve it to html string variable //... //... // save html to personalization block personalizationBlock.supply.html = html; //reserve it personalizationBlock.save();
Utilizing pre-processing directions
Second method to obtain the identical is to make use of Adobe’s function referred to as pre-processing instructions.
They solely apply within the context of supply content material. It’s the solely method to script the URL of an e mail and nonetheless have it tracked
https://experienceleague.adobe.com/
We already learnt that we will obtain the identical with the workaround proven earlier than.
Create database schema
To make use of pre-processing with dynamic hyperlinks you have to to create database schema the place all dynamic hyperlinks shall be saved beforehand. You may create regular database schema as you’d in the event you create new desk. After you have to reference this schema contained in the supply in personalization tab. It can save you as a lot info you need and the reference it whereas displaying the dynamic hyperlinks.

These hyperlinks are then used to offer dynamic url parameters for every recipient. Additionally understand that all of the hyperlinks are similar for all recipients of the supply. Then to point out every recipient hyperlinks based mostly on their desire you have to to create rendering lookup operate with the adobe marketing campaign pre-processing directions. Additionally examine the choice generate a JavaScript desk.
Pre-processing directions
The JavaScript identify will then be referenced within the pre-processing directions in for loop
<%@ foreach object="javascriptName" merchandise="javascriptName_item" %>
We are going to present on the instance offered by adobe how one can create dynamic hyperlinks with the for loop. First you have to have some identifier by which it is possible for you to to match recipient hyperlink within the listing of all hyperlinks. The id for merchandise to show will come within the goal knowledge to the supply (will probably be connected to the recipient and can or might be totally different for every one)
<%@ worth object="startScript" %> operate displayLink(id) { <%@ foreach object="javascriptName" merchandise="javascriptName_item" %> if( id == "<%@ worth object="javascriptName_item" xpath="@id" %>" ) { <%@ worth object="endScript" %> <a href="http://instance.internet?id=<%@ worth object="javascriptName_item" xpath="@id" %>">Some dynamic hyperlink</a> <%@ worth object="startScript" %> } <%@ finish @%> } <%@ worth object="endScript" %>
Principally the instruction
<%@ worth object="javascriptName_item" xpath="@id" %>
will insert worth to the personalization script. So if the variable is string you have to wrap it with double quotes in any other case you’ll be getting errors in personalization within the supply log.
"<%@ worth object="javascriptName_item" xpath="@id" %>"
Show the hyperlinks utilizing for loop
<% var dynamicLinksArray = 'might be array variable you'll be able to inject to the personalization block from the focusing on dimension' + 'might be additionally hyperlink to a different desk' for(var i=0; i<dynamicLinksArray.size; i++ ){ displayLink(dynamicLinksArray[i]) } %>
Professionals and cons
I do not need any desire which means so as to add dynamic hyperlinks to the supply for me each the workaround and pre-processing directions labored similar.
Workaround | Pre-processing directions |
Simpler to understand the idea | |
No must create database schema | |
The seller described means | |
_label, _type attributes works correctly | |
Much less code written to personalization blcok |