Can I dynamically call an image using a token? | Community
Skip to main content
December 16, 2014
Solved

Can I dynamically call an image using a token?

  • December 16, 2014
  • 8 replies
  • 2843 views
I would like to insert a picture in an email based on the token lead.state. I have images in my Marketo Images area named after each state (e.g. Ohio.jpg, Iowa.jpg). I would like the top banner of an email to have their state showing and then show them an offer based on their lead.state location. I'm having a hard time connecting the token to the image. I've read through some other discussions but haven't had any luck. What am I missing?

 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by
This is no problem as you stated above.

If the URL is...
http://marketo.url.to.image/state.jpg

Then change the URL to be 
http://marketo.url.to.image/{{lead.State}}.jpg


That's it. Just make sure there's a graphic for every state possibility (ie Provinces) & a backup/default image in case it is blank.

8 replies

December 16, 2014
You should be using segmentations and the dynamic content features. Here is a really good article on how to do what you are wanting to do. https://community.marketo.com/MarketoTutorial?id=kA250000000Kz0SCAS

 
December 16, 2014
Thanks for the response Shannan. I know how to do this by segmentations but I was hoping it was possible by using Tokens instead. 
 
Accepted solution
December 16, 2014
This is no problem as you stated above.

If the URL is...
http://marketo.url.to.image/state.jpg

Then change the URL to be 
http://marketo.url.to.image/{{lead.State}}.jpg


That's it. Just make sure there's a graphic for every state possibility (ie Provinces) & a backup/default image in case it is blank.
December 17, 2014
Hey Adam, thanks for the reply. Sorry if this question is dumb, but where would the updated image URL go? Would I just edit the URL of the image in that image record? I can't seem to edit the image URL there. 
December 17, 2014
I would upload them with the correct names. You can click on an image & tell it to replace & it will change the url (but not the name), but I would just to be safe, upload them again.
December 18, 2014
It's Adam's world and we're all just glad to be living in it :)
December 18, 2014
Hush Charlie. There are a lot of excellent people (yourself included) who contribute to the community.
December 18, 2014
Update to say this worked exactly as you described, Adam. Thank you so much for the help.