Using Marketo ID inside of a token
I've built an email where most of the content is generated inside of a script token. This token uses a For Loop (and information from the customer's profile) to generate a bunch of CTA's that the customer can click on. This all works fine; I just needed to explain that the For Loop inside the token is vital to the email's construction.
Here's the problem: The CTA's created inside of this loop needs to pass the customer's Marketo ID as a way to identify them(something like "website.com/?mID=(Marketo ID"). I found that I can drop {{Lead.ID}} straight into the email body and it will display the number no problem. However, using that same code inside a token doesn't work. The result is "website.com/?mID={{Lead.ID}}".
Next I tried declaring it as a variable inside of a token. I check the box next to "Marketo ID", wrote "#set( $m_ID = ${lead.marketoID}) at the top of my token, and then wrote the URL into the token as "website.com/?mID=${m_ID}." The end result is the link looking like "website.com/?mID=" with no ID or even the variable name.
It seems silly to me that there wouldn't be a way to include Marketo ID in a token, but I just can't find a way to do it. Is there a way to do what I'm describing? If there's a better way to ID someone via a URL parameter for use on another website, I'm all ears.