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)
Solved! Go to Solution.
Thanks for sharing that! I’m not referencing any lead token in the link - just the velocity token.