Marketo System Asset ID to attached to links as Parameter in Email | Community
Skip to main content
Level 2
September 13, 2025
Solved

Marketo System Asset ID to attached to links as Parameter in Email

  • September 13, 2025
  • 2 replies
  • 1348 views
Hi Everyone, I'm looking for some help with Velocity scripting to auto populate the Email ID (or Asset ID) in order to include this Marketo system Asset ID as a parameter attached to the links in my email. I found a few articles in the community (like this one: https://nation.marketo.com/t5/ideas/email-id-system-token/idi-p/278839#comments) that uses Velocity scripting to extract the email ID from the xMarketoIdHdr header. 
 
I used the script from this post and the VS token I created does work and populated the Asset ID if added to the email as token within a text element. However, when I add this token or variable to my URL as a parameter, this does not appear to work unless I disable my tracking which is what I don't want.
 

However, when I disable tracking, the URL looks like:
https://www.example.com/index.html?cta_id=article-ban-masthead&EmailID=26408
 
Does anyone know if there are any tricks or a solution or work around? 

Thanks a lot!
Best answer by SanfordWhiteman

We have instances where a smart campaign is sending more than one email for example if a drip-style send is requested. We also have instances where an email program (not a smart campaign) is sending a program.

 


OK. If you can’t use Velocity to generate links, I think using {{campaign.id}} is your only path forward.

 


We have instances where a smart campaign is sending more than one email for example if a drip-style send is requested.


If you switch those to executables, you’ll have a unique {{campaign.id}}. Shouldn’t be too tough.

 


We also have instances where an email program (not a smart campaign) is sending a program.

There’s an underlying {{campaign.id}} for those, so that’s fine.

 

Another method is to use Munchkin to send a synthetic Click Link activity (that is, in addition to the automatic Click Email) that includes the Email ID. You will need a developer for this.

2 replies

SanfordWhiteman
Level 10
September 13, 2025

The only supported way to use tracked links + Velocity is to output the entire <a> tag from Velocity.

 

But let’s step back and make sure we don’t have an XY Problem. What is the full business requirement (not specific technical implementation) that you are trying to meet?

Level 2
September 17, 2025

To improve our tracking and data collection in Adobe Analytics, we would like to have a unique identifier, like the Email Asset ID, as a parameter on all the URLs in our emails.  This will ensure that the identifier is associated with each individual email, making it readily available and captured for tracking purposes in Adobe Analytics.

 
Open to any other suggestions to track URLs linked to a single email asset!
SanfordWhiteman
Level 10
September 17, 2025
Do you send more than one email using the same Smart Campaign?
Level 2
September 19, 2025

We have instances where a smart campaign is sending more than one email for example if a drip-style send is requested. We also have instances where an email program (not a smart campaign) is sending a program.