Velocity Script with Custom Object and lead.id
Having troubles with velocity scripting on Custom Objects. Looking to do a table that provides dynamic content for the text as well as links that are able to be referenced for that text.
Here is the script that has been built so far setting the parameters for our utm string as well:
## Set UTM Parameter Values
#set( $progName = "name of program here" )
#set( $emailID = "xxxxx" )
#set( $leadID = $lead.id )
#set( $utmOffer = "offer" )
#if($myCustomObject.customUrl1)
#set($url = $myCustomObject.customUrl1)
<a href="https://${url}&utm_source=marketo&utm_medium=email&utm_campaign=${progName}&utm_offer=${utmOffer}&utm_content=assetID:${emailID}&utm_term=mkid:${leadid}
">$myCustomObject.customString2</a>##
#end
Links hosted on Marketo (Design Studio) are working as they should. Other links non-Marketo hosted are not rendering and breaking somewhere with the mktg-alert tracking wrapper.
Additionally, since lead.id is not a field I am able to choose from the Custom Object Tree bc it's not a system token (and we need to use that as it's unique due to dupes in the system) - I tried the marketosend.leadid script and still can't get that piece to work.
Can anyone help troubleshoot?