SOLVED

Cant add tracking snippet because Marketo keeps removing <style> tags

Go to solution
Dean548
Level 2

Cant add tracking snippet because Marketo keeps removing <style> tags

Hi,

 

Iā€™m currently testing Email On Acid's Analytics feature, and I need to add a tracking code snippet to my email for it to work. However, when I paste the code into the HTML source editor and click save, Marketo automatically removes the <style> tags. Is there a way to prevent this from happening?

 

Unfortunately, I can't use the 'Edit Code' option to insert the tracking code because my email template contains dynamic content that cant be removed this is why I'm trying to add the code directly through the HTML source editor.

 

Thanks you in advance šŸ™‚

1 ACCEPTED SOLUTION

Accepted Solutions
Dave_Roberts
Level 10

Re: Cant add tracking snippet because Marketo keeps removing <style> tags

Marketo's Rich Text Editor rejects <style> tags, that's the expected behavior.

 

That said, be warned: using the Edit Code feature in an email will break the connection between the email and your template and could render the modules panel obsolete for that specific email asset. I'd avoid using that as much as possible as often as possible. There's almost always a better way to edit email code in the Email 2.0 version than to use the Edit Code functionality. 

 

The best way to setup a <style> tag that you need to be on an email asset would be to add it at the template level and then reapprove the template and the email assets hanging on that template. 

 

 

View solution in original post

2 REPLIES 2
KevinHaa
Level 1

Re: Cant add tracking snippet because Marketo keeps removing <style> tags

The usual procedure, to add EAO to Emails with dynamic content:

 

Remove the dynamic content from Email.

Use EAO on Email with "Edit Code".

Add the dynamic content again.

 

If I remember correctly, it does not even have to be all dynamic content to be removed for EAO to be applied.

Just the topmost one if this has a snippet.

 

Cheers

 

 

Dave_Roberts
Level 10

Re: Cant add tracking snippet because Marketo keeps removing <style> tags

Marketo's Rich Text Editor rejects <style> tags, that's the expected behavior.

 

That said, be warned: using the Edit Code feature in an email will break the connection between the email and your template and could render the modules panel obsolete for that specific email asset. I'd avoid using that as much as possible as often as possible. There's almost always a better way to edit email code in the Email 2.0 version than to use the Edit Code functionality. 

 

The best way to setup a <style> tag that you need to be on an email asset would be to add it at the template level and then reapprove the template and the email assets hanging on that template.