Marc Comption

Velocity Scripting Issue

Discussion created by Marc Comption on Oct 17, 2019
Latest reply on Oct 21, 2019 by Sanford Whiteman
#if( $lead.dSSiteID == "3670" )
     #set( $ScriptTokenTEST = "www.bigstarhonda.com/special-offer/" )
    <a href = "https://${ScriptTokenTEST}">Big Star Honda</a>
#elseif( $lead.dSSiteID == "2289" )
     #set( $ScriptTokenTEST = "www.hamertoyota.com/special-offer/" )
     <a href = "https://${ScriptTokenTEST}">Hamer Toyota</a>
#else
     #set( $ScriptTokenTest = "www.kengarff.com/special-offer/" )
    <a href = "https://${ScriptTokenTEST}">Ken Garff</a>
#end
${ScriptTokenTEST}

Hi All,

Looking for some suggestions on Velocity scripting with tokenized URLs. Our basic email URLs aren't tracking in Marketo so I'm trying to adjust them to make that happen. here is my token code:

 

#if( $lead.dSSiteID == "3670" )
    #set( $ScriptTokenTEST = "www.bigstarhonda.com/special-offer/" )
    <a href = "https://${ScriptTokenTEST}">Big Star Honda</a>
#elseif( $lead.dSSiteID == "2289" )
    #set( $ScriptTokenTEST = "www.hamertoyota.com/special-offer/" )
    <a href = "https://${ScriptTokenTEST}">Hamer Toyota</a>
#else
    #set( $ScriptTokenTest = "www.kengarff.com/special-offer/" )
    <a href = "https://${ScriptTokenTEST}">Ken Garff</a>
#end
${ScriptTokenTEST}

 

I attached the email we built from the template Marketo gave us, my thought is that somehow these two are not set up to work together correctly. As a novice as scripting, I could really use some help!

 

Thanks!

 

Marc Compton

Attachments

Outcomes