My Tokens and images

Phillip_Wild
Level 10

My Tokens and images

I'm having some trouble getting Marketo to recognise my tokens as a reference to an image.

I read somewhere else that you need to use the token like this in your code:

<img src="http://{{my.Token}}">

And my token is the URL without the "http://" part.

I currently my links set in this manner, but I'm not seeing them in the Email Preview screen. The other tokens populate. I assume I can use Plain Text tokens for this purpose?

Thanks in advance!

Phil

Tags (1)
7 REPLIES 7
Alok_Ramsisaria
Level 10

Re: My Tokens and images

Hi Phil

The Token will populate only if you would use "http://{{my.Token}}". You can use Token type as TEXT and use Image URL there.

Best Regards

Jenn_DiMaria2
Level 10

Re: My Tokens and images

My understanding is that you only have to include the http:// in front of your My Token if you plan on tracking links or triggering Smart Campaigns from them. So that said, I've been using the full image URL for any images I want replaced with a My Token.

Scott_McKeighe2
Level 5

Re: My Tokens and images

I set up tokenized images in the manner you describe, Phillip, using a plain text token to house the image URL without the http prefix. It doesn't render in the Email Editor, but does when the email is previewed.

I'd recommend looking at the syntax of the link via the HTML Source window in the Email Editor, just to confirm that nothing's been changed. The Email Editor is notorious for modifying code. If that doesn't work, I'd give Jennifer's solution a try and put the entire URL into a token to see if that works.

Jenn_DiMaria2
Level 10

Re: My Tokens and images

Following up to Scott McKeighen​'s post, if your image URL has any spaces in it, the email editor could replace them with "%20", which will break the image link.

Phillip_Wild
Level 10

Re: My Tokens and images

Hi guys

Ok I've found the solution after some playing around. Unfortunately none of your solutions worked....and it's because I was using a space in my token name. Once I changed my token name from:

{{my.Header Image URL}} to

{{my.Header_Image_URL}}

The image rendered perfectly. I've found the same thing with Google Analytics tokens too - you not only can't have a space in the name of the token, but you also can't use "%20" as a spacer in the actual token value, because Marketo interprets that as a space in the URL.

I hope this helps anyone in the future!

Phil

Sabrina_Bozek
Level 1

Re: My Tokens and images

Just chiming in here with my success steps for anyone else trying to show an image in an email using a token....I followed this thread's advice and made some minor adjustments.

1. The token that will render the image should be a Text token, not Rich Text.

2. The image URL in the token itself cannot have the http:// or https://  protocol.

3. In the HTML for the email, use the <img src="http://{{my.Token}}"> and make sure that you have the my.Token or lead.Token in there. I was getting an error because I'd paste in the "img src" code but then paste in the Token name without the "lead." You can't approve the email without the valid token name.

4. You will not be able to see the image in the editor box (it'll just show as a broken jpg symbol), but will render properly in Preview or in a Test email. 

Hope this is helpful!

Lynn_Ray_Pardo
Level 5

Re: My Tokens and images

Thank you, Sabrina!

Breaking this out into a series of steps is hugely useful!!

Lynn