SOLVED

Malformed Link Creation using Velocity Script

Go to solution
Jay00031987
Level 4

Business requirement is to add specific URL in the email assets including UTM parameter field.  However, there are two different velocity script created in which one of them need to add the URL within the Velocity token and this link does not create  Malformed Link  refer below code

 

 

#set( $UTM= ${lead.encryptedID} )
#set( $url = "https://www.google.com" )
#set( $encryptedValue = $esc.url($UTM))
#set( $encryptedURLPrefill = $url + "?UTM=" + $encryptedValue)
${encryptedURLPrefill}

 

Below OUTPUT URL is working fine
 http://www.google.com?UTM=niuwtv%2FX6QbChEVV46iplJEmx02eOtwqJzG%2Fnm9fmYouZwADkHr%2BMg%3D%3D 

 

But, business need is to take out the URL from velocity token and use only UTM parameter via velocity token. In that case, Malformed Link is being created and traced in Email Link Performance report. refer below code

 

 

#set($UTM= ${lead.encryptedID})
#set($url = "dummy text")
#set($encryptedValue = $esc.url($UTM))
${encryptedValue}

 

 

did anyone faced this issue for Malformed Link Creation using Velocity Script what can be best way to resolve this issue?

 

malformed link example


google.com/set(%20$UTM%20=%20$%7Blead.encryptedID%7D%20) 

Jay
1 ACCEPTED SOLUTION
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Thanks for sharing that! I’m not referencing any lead token in the link - just the velocity token.

Darshil_Shah1_0-1647871457570.png

 

View solution in original post

17 REPLIES 17