SOLVED

Re: Can I pull an email's name for use in a lead token?

Go to solution
Guitarrista82
Level 6

Can I pull an email's name for use in a lead token?

Hi Community,

 

Our marketing team would like to be able to get the name of an email (not the Email ID) so that we can add it to the token shown below so it would look like this:

 

utm_source=marketo&utm_medium=email&utm_campaign=36 CUG Staff Picks 10.29.24

 

Guitarrista82_0-1730742801345.png

 

Guitarrista82_0-1730743500701.png

 

Is there a way that the email name can be pulled via API and then populate a lead token that can be used within the Google UTM token we created?

 

Thank you,

LK

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Can I pull an email's name for use in a lead token?


Is there a way that the email name can be pulled via API and then populate a lead token that can be used within the Google UTM token we created?


To be clear, it is possible to use the REST API to read the name and write to a Text {{my.token}}. But that would mean only one {{my.token}} per program, which won’t work for programs with multiple emails.

 

You would have to write to a Velocity {{my.token}} that contains a map of all the program’s email IDs and each email’s friendly name. Then use another {{my.token}} to find the current email’s name. This is a pretty tall order if you want this to happen with every link in an email, and remember the token must be updated every time an email asset is created or its name is changed.

View solution in original post

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Can I pull an email's name for use in a lead token?

Nope, sorry.

Guitarrista82
Level 6

Re: Can I pull an email's name for use in a lead token?

Actually, I was able to pull the email name via API - it's just a clunky process because it requires knowing the Email ID in order to pull it:

 

Guitarrista82_0-1730751214252.png

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Can I pull an email's name for use in a lead token?

(Of course you can read the name via API. It’s a question of automatically syncing all email names to {{my.tokens}}.)

SanfordWhiteman
Level 10 - Community Moderator

Re: Can I pull an email's name for use in a lead token?


Is there a way that the email name can be pulled via API and then populate a lead token that can be used within the Google UTM token we created?


To be clear, it is possible to use the REST API to read the name and write to a Text {{my.token}}. But that would mean only one {{my.token}} per program, which won’t work for programs with multiple emails.

 

You would have to write to a Velocity {{my.token}} that contains a map of all the program’s email IDs and each email’s friendly name. Then use another {{my.token}} to find the current email’s name. This is a pretty tall order if you want this to happen with every link in an email, and remember the token must be updated every time an email asset is created or its name is changed.

Guitarrista82
Level 6

Re: Can I pull an email's name for use in a lead token?

Thanks Sanford - yes, thinking through this it sounds like it would be a lot of work and potentially time-consuming. I'll talk to our team and get their thoughts on it. I'll let you know if they decide to move forward and we need help implementing a Velocity script token.