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
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
Solved! Go to Solution.
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.
Nope, sorry.
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:
(Of course you can read the name via API. It’s a question of automatically syncing all email names to {{my.tokens}}.)
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.
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.