SOLVED

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

Go to solution
Anonymous
Not applicable

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

HI,

Is it possible to pass Html & JS content as part of token to a email template? 
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Edward_Unthank_
Level 10

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

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
 

View solution in original post

2 REPLIES 2
Edward_Unthank_
Level 10

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

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
 

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

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

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.