Re: Use the email's asset name in a token

Juan_Carlos_Alv
Level 2

Use the email's asset name in a token

Hi there,

I'm trying to personalize part of the email's body name using the name of the asset where that email is being sent.

For example, if the email asset in Marketo is: Test Email

I want to be able to use that name inside the body of my email, as part of the variables sent in an URL:

a href="http://www.domain.com/landingpage.html?source=Test Email"

This will allow me to track the visits in our analytics tool, that uses the variable "source" to identify where is the visit coming from.

I'm wondering if there is an object available to use in the Velocity Scripts tool.

Any idea?

Thanks!

6 REPLIES 6
Josh_Hill13
Level 10 - Champion Alumni

Re: Use the email's asset name in a token

Why not just use a Program Token and put the asset name in there?

There are several threads on using my tokens to insert UTM codes. I would go in that direction.

Juan_Carlos_Alv
Level 2

Re: Use the email's asset name in a token

Thanks Josh,

I can do that, but the idea is to use the same token in all of the different emails that I have.

I don't want to be generating a new program token for each email. I was hoping to have that information using email scripting.

John_Clark1
Level 10

Re: Use the email's asset name in a token

Hi Juan,

There isn't currently a token that would put the name of the email in, but I do have another suggestion.

If you're sending each of the emails out from a smart campaign with a similar name, then you could use the {{campaign.name}} token.  This would populate with the name of the campaign.  You could use the same token in each email, and it would help to identify them if the names of the campaigns are similar enough to the names of the emails.

The other option would be to use the {{campaign.description}} token, and then add a note to each campaign's description before you send the email.  This is the same idea as above, and you could still use a single token in every email, but you would be able to have the campaigns named whatever you want and still get the exact name of the email.

John

David_Desrosie2
Level 4

Re: Use the email's asset name in a token

I ran into the same limitation lately and had to set the name of the asset (we where using utm_content param) manually into each link...And that was painfull.

I like Juan's Idea, but it cannot be applied to our project since we use engagement programs where there is no such "campaign" that we can rename.

Please vote for this idea to integrate UTM parameters 

Juan_Carlos_Alv
Level 2

Re: Use the email's asset name in a token

Thanks John,

I thought about that too. The only limitation is that you need a smart campaign for each email you have.

In my situation I have several emails and having a smart campaign for each one would be painful too.

I've supported David's idea so luckily we will have a fix soon

Mike_Reynolds2
Level 10

Re: Use the email's asset name in a token

I agree that it would be nice to have a built in functionality that would do everything automatically. In the meantime, until that is designed and developed, there is at least one other option that may save a little time. The URL builder will build your URL with the UTM Parameters in the querystring the way that you need. It doesn't fully automate the whole process, but could save a couple steps along the way. Using the URL Builder - Marketo Docs - Product Docs