Velocity created email content, problem on how to track links in email | Adobe Higher Education
Skip to main content
Franky_Ruyssch2
Level 4
April 8, 2022
Beantwortet

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

  • April 8, 2022
  • 1 Antwort
  • 1835 Ansichten

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-or/ba-p/314510 )

 

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???

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von Darshil_Shah1

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. 🙂

1 Antwort

Darshil_Shah1
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 8, 2022

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
April 8, 2022

Hi,

thanks for the help. Problem solved.

Franky Ruysschaert