Skip to main content
When I paste a full HTML email (doctype, CSS, etc) into the WYSIWYG, everything looks fine. But a test send did not show a preheader in the inbox preview and when I return to the template, everything above the first table is stripped.





Including a preheader is a basic email best practice. How can this be included, and why is so much of the code being stripped when Gainsight's own best practices dictate to use doctype? Is there something else that needs to be specified? Thanks!
I know this is also super frustrating for my Programs people. Would love some feedback or explanation from Gainsight on this one.
I have also seen this issue, and it affects my workflow when I'm unable to trust the Copilot HTML editor won't strip out my code. Leads to a LOT of double-checking and testing.





Short term - Could the documentation for best practice be updated? 


Long term - Could the Copilot HTML editor allow for preheaders?
I was working with Alison on this issue, and she was able to show me exactly what they are seeing in this ticket. If you are an internal Gainsight resource, feel free to check this out. 
I want to add that not only is it stripping code, it is also adding [i]a ton of erroneous code, the kind you typically see if pasted from Word, however an email created from scratch still contains it. 
How is this marked as Solved? I still have HTML being stripped from my emails including the Preheader?
Agreed! This is also still an issue for me. It is very frustrating that issues like this persist in Journey Orchestrator and are not being addressed, or even given a response in the community.
Hi Kelly and Allison,





Iam not sure how this post is marked as Solved. I have changed it to Acknowledged instead of Solved. This is there in the roadmap and we anticipate this to be available in the next 2 to 3 releases.





Thanks


Abhishek S

Since this is the only thread I could find on this topic, I figured I’d add my findings in case anyone is still having trouble implementing preheader text into an email template.  Disclaimer: I was able to get this to work, but I’m not well versed with css/html by any means.  My hunch is I got lucky and found a method that worked so I wanted to share :smiley: .  To my knowledge nothing has been stripped out, but again, I’m no expert.

 

There are 2 lines of code to add to the email template (listed below with screenshots):

 

#1:

<style type="text/css">span.preheader {display: none!important;visibility:hidden;opacity:0;color:#ffffff;height:0;width:0;font-size:1px}</style>

The above should go right above the </head> tag:

 

#2:

<span class="preheader">PREHEADER TEXT HERE</span>

 

Gotchas:  When previewing this in the Email Template UI, everything displayed correctly.  However, when previewing it from the JO program, I can clearly see the preheader text displayed at the top of the email body.  It doesn’t show when you send it, but it’s odd that the program’s preview doesn’t respect the visibility:hidden or opacity:0 constraints.


Hello!

Happy to announce that your request has been considered. Email Templates are enhanced with a new UI and significant performance improvements. Changes in the feature make it more user-friendly, and also allows admins to customize the email templates to provide the best email template layout that works in various email clients.

You can find the relevant information in Release Notes.

This feature is implemented in both SFDC & NXT version.

Thanks for posting!


@puna thanks for sharing the code workaround -- can I just confirm that what I’m seeing is expected?

 

Here’s what I’m seeing: I’m seeing the preheader text I configured, but then it immediately goes into the first line of the email. Typically, my preview would end at the end of the preheader. Red is my coded preheader, blue is the first line of my email template. How can this be configured so I do not see the blue?

 

 


@sarahmiracle can’t confirm these options right now, but a couple you could try (from my days as an email marketer, some code snippets I had saved). First option is to just add extra spaces after your preheader so it pushes the first line of the email out of the preview line, second is to actually hardcode the preheader text (if Gainsight doesn’t strip that code still).

Option 1

To just insert spaces after the pre-header text:

Paste the following text above the !DOCTYPE HTML PUBLIC tag:

<div style="display: none; max-height: 0px; overflow: hidden;">
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
</div>

Option 2

To hard-code the subject line and preheader text:

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml"> 
<head>
<title>Insert SL
</title> <!--lif !mso]><!-->
</head>
<body> <span class="esd-hidden-preheader" style="display:none !important;font-size:0px;line-height:0;color:#ffffff;visibility:hidden;opacity:0;height:0;width:0;mso-hide:all;">Insert preheader. </span>
<div style="display:none;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">
{{ preview_text|default:'' }}͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj; ͏&zwnj;
</div>

 


Reply