Hello, I am using velocity script to set a link based on lead language, I have a series of 12 if/then statements.
The velocity script is working fine during previews in marketo, but when sending tests to my email, the link breaks. How should I format the output, so the link does does not break?
We have/want to use a tags on the email side instead of the velocity side for formatting' the reason is we use the token in multiple places in the email with different styling. What is the exact format I need to print my token via velocity script so the link does not break when sending emails?
Solved! Go to Solution.
OK, that’s not a sample then. Terminology matters!
You need to output the whole link, e.g.:
## some Velocity
## some other Velocity
<a href="https://${someVelocityVariable}">Visit</a>
As a rule, don’t use Send Sample to test Velocity tokens. Only use real emails.
As far as the links, as noted in lots of other places you need output the entire link, from opening <a>
to closing </a>
, from your Velocity code. Only outputting part of the link from Velocity isn’t supported.
Thanks for the reply, yes testing with "real" emails as samples.
Would I be able to print https://$link via velocity script?
Or how could I keep the a tags outside of velocity
Actually just tried that and the link breaks in the email (okay in the preview).
I put https://$link as my output.
Thanks so much! And does sending a tracking URL through velocity script break the tracking at all?
And is there a way to make the velocity script output as text instead of URL? When using a text token to put URL, I am not experiencing the same issue
To get a little pedantic, you don't send a tracking link through Velocity. You create a link in Velocity, and Marketo processes it after that into a tracked link.
But if the question is 'are links created in Velocity tracked?' then the answer is yes, unless you specifically include the no tracking class.
Cheers
Jo
For the way our tracking is setup, if the link is coming through velocity script, the link is not tracked. Is there anyway I can keep the https:// outside of the velocity script? Or print the script in text?
I know this works in text tokens