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

Diana-Gilman
Level 1
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.
 
So, when I append the URL to include this VS Token parameter, this is the result and the EmailID looks like this (also note that the Asset ID isn't populated here:

https://www.example.com/index.html?cta_id=article-ban-masthead&EmailID=&mkt_tok=MjEyLVRDVS0wMzQAAAGc...

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!
3 REPLIES 3
Diana-Gilman
Level 1

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!
Tags (2)
SanfordWhiteman
Level 10 - Community Moderator
Do you send more than one email using the same Smart Campaign?
SanfordWhiteman
Level 10 - Community Moderator

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?