AnsweredAssumed Answered

Velocity Script not resolving in URL

Question asked by Jon Yang on Jan 18, 2019
## set Source and Medium

#set( $source = "email" )
#set( $medium = "email" )

## set Campaign Name

#set( $campaign_name = "campaign_name" )

## set Content

#set( $content = "content" )

## set Term 

#if( ${lead.Segmentation_A} == "A" )
#set( $term = "AX" )
#elseif( ${lead.Segmentation_B} == "B" )
#set( $term = "BX" )
#elseif( ${lead.Segmentation_C} == "C" )
#set( $term = "CX" )
#else
#set( $term = "DX" )
#end

## link output
?utm_source=$source&utm_medium=$medium&utm_campaign=$campaign_name&utm_term=$term&utm_content=$content

 

Hi everyone,

 

I'm having issues getting the above script token to resolve in the link. The link does not populate with the output but rather with the entire velocity script. I've seen similar issues posted regarding $foreach loops but I'm not using a $foreach loop in my case so I'm a bit puzzled as to why this isn't working. Any help is appreciated!

Outcomes