Skip to main content
kelly
Helper ⭐️⭐️⭐️
April 24, 2018

Email template is stripping preheader (and other code)

  • April 24, 2018
  • 11 replies
  • 603 views
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!

11 replies

brad_jennings
Contributor ⭐️⭐️⭐️
April 26, 2018
I know this is also super frustrating for my Programs people. Would love some feedback or explanation from Gainsight on this one.
alison_hight
Contributor ⭐️⭐️
April 26, 2018
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?
dan_wiegert
Gainsight Employee ⭐️⭐️
May 7, 2018
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. 
Dan Wiegert - Gainsight DCS
kelly
kellyAuthor
Helper ⭐️⭐️⭐️
May 7, 2018
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. 
kelly
kellyAuthor
Helper ⭐️⭐️⭐️
September 20, 2018
How is this marked as Solved? I still have HTML being stripped from my emails including the Preheader?
alison_hight
Contributor ⭐️⭐️
September 20, 2018
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.
abhishek_sivaraman
Helper ⭐️⭐️⭐️
September 21, 2018
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
puna
Helper ⭐️
February 28, 2020

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.

Helper ⭐️⭐️⭐️
March 1, 2020

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!

sarahmiracle
VIP ⭐️⭐️⭐️⭐️⭐️
June 13, 2022

@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?

 

 

Customer Success Systems Admin @ Amplitude, 3x Gainsight CS Ops Product Council Member