Is it possible to pass Html & JS content as part of token to a email template? | Community
Skip to main content
January 29, 2015
Solved

Is it possible to pass Html & JS content as part of token to a email template?

  • January 29, 2015
  • 2 replies
  • 1862 views
HI,

Is it possible to pass Html & JS content as part of token to a email template? 
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 Edward_Unthank_
Yes! Text tokens don't filter out abnormal content, so you can use them for abnormal JavaScript. 

Here's a little guide I threw together: Marketo Token Guide

EDIT: So for email templates, this works when you're editing the <body> section, but it doesn't work when you're editing the <head> of the email template. I'm not sure why this is, and it's slightly frustrating at times. But in the normal content of the email, and especially within the mktEditable sections that will appear in the WYSIWYG editor, tokens are accurately parsed. (Also, JS in email content wouldn't do much, depending on the JS and the email cients you're dealing with.)
 

Best,

Edward Unthank | Founder, Etumos
 

2 replies

Edward_Unthank_
Edward_Unthank_Accepted solution
Level 7
January 29, 2015
Yes! Text tokens don't filter out abnormal content, so you can use them for abnormal JavaScript. 

Here's a little guide I threw together: Marketo Token Guide

EDIT: So for email templates, this works when you're editing the <body> section, but it doesn't work when you're editing the <head> of the email template. I'm not sure why this is, and it's slightly frustrating at times. But in the normal content of the email, and especially within the mktEditable sections that will appear in the WYSIWYG editor, tokens are accurately parsed. (Also, JS in email content wouldn't do much, depending on the JS and the email cients you're dealing with.)
 

Best,

Edward Unthank | Founder, Etumos
 
SanfordWhiteman
Level 10
January 29, 2015
Yeah, I'd go with "JS will do absolutely nothing for you." No mainstream desktop and web-based email apps will execute JS, and for good reason.