Re: Getting Marketo to track a link created in a Velocity Token pulling a Custom Object value

SanfordWhiteman
Level 10 - Community Moderator

Re: Getting Marketo to track a link created in a Velocity Token pulling a Custom Object value

If you can’t exclude the hostname as the object is written, you can still take the substring(8) and use that.

You don’t actually have to have the <a> inline with the <table>, but it’s obviously fine if you’re comfortable with it.

Don’t forget to change the closing </v:roundrect> to </a:roundrect>,

Chris_Politzki
Level 2

Re: Getting Marketo to track a link created in a Velocity Token pulling a Custom Object value

Great, I'll keep this thread posted. Thanks for the a:roundrect reminder. 😉

Chris_Politzki
Level 2

Re: Getting Marketo to track a link created in a Velocity Token pulling a Custom Object value

Just a follow up, but we are deciding to not change the URL field in the Custom Object, so I've gone ahead and used your suggestion and created this:

In the Velocity Script:

#set($anchorLinkCustomObjectStripped = $anchorLinkCustomObject.substring(8))

In the Content:

<a href="https://${anchorLinkCustomObjectStripped}" target="_blank">Some Anchor Text Here</a>

Thanks again for all of your assistance on this!