Marketo Velocity Script Token: replace a variable / add a query string
Hello everyone!
I hope you are well and can help me in my research.
I should perform an operation with velocity scripts, however, my programming knowledge is really limited and I am struggling to understand how to do it.
Basically, from CRM via integration with Marketo, when I create events in the CRM, I carry around a whole set of information that then populates the event tokens on Marketo.
Now, I have to carry around links.
I can set these links on my CRM, but I cannot make them dynamic (I need to add a querystring with like ?aid={{lead.account}} at the end of each url, and this informations is setted in Marketo and not Dynamics.
Since the links are themselves already contained in a token, I can't put a token inside a token because I've already tried it and it doesn't work.
I tested:
{{my.token}} with the token text as www.google.com/?aid={{lead.account}}.
So I'm wondering: is it possible to set a VLC token that adds ?aid={{lead.account}} to every link in my dem?
If not, is it possible to make the link in the token be:
{{my.token}} with the token text as www.google.com/?aid=REPLACEME.
And via a velocity script replace that "REPLACEME" with {{lead.account}}?
Unfortunately, my skills so technical are limited and I am struggling.
I thank anyone who can help me!
(of course if there are faster or smarter way let me know! I I don't have to compulsorily use a token script)