Re: Emojis in Preheader

Michael_McGowa1
Level 3

Emojis in Preheader

Has anyone had success in putting emojis in the preheader? I have been able to do it in the subject line by following the method here https://blog.teknkl.com/yes-you-can-use-emojis-in-marketo-subject-lines/?marketo-nation but when I follow the same method for the preheader, the code renders and not the emoji. If I try putting the emoji in the preheader text, then the rest of the text disappears. I also tried making the preheader a token but that did not help. Any advice?

14 REPLIES 14
SanfordWhiteman
Level 10 - Community Moderator

Re: Emojis in Preheader

Q-encoding won't work in the preheader in any case (as it's part of the HTML). Try placing the raw Emoji characters in a Velocity {{my.token}} (but not using the built-in Preheader shortcut, actually build it into the termplate).

Michael_McGowa1
Level 3

Re: Emojis in Preheader

Unfortunately, that did not work. I also tried saving the raw emoji as a text file, then rich text file in the tokens window and those did not work either.  FYI, I am putting this code in my styles tag

span.preheader { display: none !important;}

 

Then the following after the body tag.

<span class="preheader">{{my.clipboardemoji}} Earn Cash Just by Completing Free Surveys Online {my.moneybagsutf}}</span>

 

Thoughts?

SanfordWhiteman
Level 10 - Community Moderator

Re: Emojis in Preheader

You're missing a left curly brace {.

 

I don't know what you mean by "file" here — in any case, I'd need to see the contents of your Velocity token. It won't work in a Text token, definitely not in a RT token.

Michael_McGowa1
Level 3

Re: Emojis in Preheader

So that bracket has been fix. Here is what I am putting into the script for the clipboard emoji

=?UTF-8?Q?=F0=9F=93=9D?=

Here is the code for the moneybags emoji

=?UTF-8?Q?=F0=9F=92=B0?=

I also on a hunch tried putting the actual emoji into the script (without the utf code). That did not work either.

SanfordWhiteman
Level 10 - Community Moderator

Re: Emojis in Preheader

I must not've been clear: Q-encoding  (which is what you're attempting here, and which works in Subject: lines as well as To: and From:) is not pertinent to the email body.

 

Q-encoding is for places, like those headers, where only raw ASCII characters are supported. In order to represent Unicode characters for eventual output, Q-encoding is a way of using special sequences of ASCII that the mail client knows to read as either UTF8 or UTF16 or even UTF32 and then output the appropriate characters.  

 

Q-encoding is the same concept as Percent-encoding (URL-encoding) except that %-encoding only does UTF8.  

 

But Q-encoding only has special meaning in certain places.  If you just plop it into HTML it's not specially-meaningful-ASCII, it's just ASCII.

 

So what I'm saying about the preheader — which is part of HTML, not a real header — is that you need to use either the actual Emoji characters (copied and pasted right into a Velocity token, where they will automatically be UTF8-encoded and eventually QP-encoded but you don't need to worry about those steps, because they're out of your control!) or the HTML escape sequences for the characters, like 

 

&#128540;

 

Michael_McGowa1
Level 3

Re: Emojis in Preheader

I did try that and unfortunately, that did not work. I first tried saving each emoji as a separate script but then the preheader would not appear at all. Also trying the entire preheader as one script i.e.

📝 Earn Cash Just by Completing Free Surveys Online! 💰

Gave me the same result and nothing showed up. Finally, when I go back to the scripts with emojis in them, and try to open them up to edit them, they do not open which is strange. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Emojis in Preheader

Works for me. This is the HTML entity code in a Velocity token.

 

2020-04-23 23_24_11-Inbox (142) - figureonecpr@gmail.com - Gmail.png

Michael_McGowa1
Level 3

Re: Emojis in Preheader

Would you post your code just so I am sure that I am not missing anything? I tried it again and it still is not working for me. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Emojis in Preheader

Simple as

It's an awesome sale! &#128540;

 in a Velocity token.