SOLVED

Velocity created email content, problem on how to track links in email

Go to solution
Franky_Ruyssch2
Level 4

Velocity created email content, problem on how to track links in email

I have an email for which the content is completely generated with velocity script.

In the content I create a list of links. The number of items in the list is different for every lead.

The problem is that I do not succeed in creating trackable links ( I refer to this post of Sanford : https://nation.marketo.com/t5/product-blogs/creating-trackable-links-even-when-a-token-includes-http... )

 

So before I generate the list, I already have some content which is avaliable in my variable ${output}, and then I continue like this:

 

 

#set( $link = "<a style='color:#00ADEF;text-decoration:underline;' href='https://www.dataline.eu/nl/" )
#set( $link = "${link}${j.u}${googleUTMString}")
#set( $link = "${link}'>")
#set( $link = "${link} ${j.t}")
#set( $link = "${link} </a>")
#set( $output = "${output} ${openListItem} ${link} ${closeListItem}")

 

 

All links are working fine, but are not tracked.
How can I solve this issue???

Franky Ruysschaert
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Velocity created email content, problem on how to track links in email

Instead of setting entire <a> through </a> in a variable - why don't you structure your script to something like below to output the data:

 

#set($url= "www.dataline.eu/nl/")
#set($dummyUTM = "?abc=def")
#set($linkText = "Click ME")
#set($output= "Some output ") 
#set($openListItem = "dummy string ")
#set($closeListItem = "Blah")
${output}${openListItem}<a style="color:#00ADEF;text-decoration:underline;" href="https://${url}${dummyUTM}">${linkText}</a>${closeListItem}

 

Also, FYR - $link is a reserved word in Velocity for the LinkTool, I would suggest using a different name for storing the URL if possible. 🙂

View solution in original post

2 REPLIES 2
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Velocity created email content, problem on how to track links in email

Instead of setting entire <a> through </a> in a variable - why don't you structure your script to something like below to output the data:

 

#set($url= "www.dataline.eu/nl/")
#set($dummyUTM = "?abc=def")
#set($linkText = "Click ME")
#set($output= "Some output ") 
#set($openListItem = "dummy string ")
#set($closeListItem = "Blah")
${output}${openListItem}<a style="color:#00ADEF;text-decoration:underline;" href="https://${url}${dummyUTM}">${linkText}</a>${closeListItem}

 

Also, FYR - $link is a reserved word in Velocity for the LinkTool, I would suggest using a different name for storing the URL if possible. 🙂

Franky_Ruyssch2
Level 4

Re: Velocity created email content, problem on how to track links in email

Hi,

thanks for the help. Problem solved.

Franky Ruysschaert