Possible to change the <head> of an email after dynamic content has been defined?

Ian_Shaw
Level 2

Possible to change the <head> of an email after dynamic content has been defined?

I need to update some meta information in an email (not attached to a marketo template, just an email asset), but the head isn't an editable area and dynamic content prevents me from viewing the code via 'Replace HTML' (error: Code editing is not available for emails with dynamic content). Is there another way I can access the email head to update the information, or do I have to remove the dynamic content, then re-add it? Thanks!

6 REPLIES 6
Julz_James
Level 10

Re: Possible to change the <head> of an email after dynamic content has been defined?

I believe you have to remove the dynamic content and then edit the code, unless you have a html module that you can add the code into?

Hobie_Thompson1
Level 4

Re: Possible to change the <head> of an email after dynamic content has been defined?

Ian Shaw​ - Juli is right here.  For a short term fix, you'll have to remove the dynamic content, then re-add it. For longer term, you could use a modular template or, for a perhaps even easier solution, use tokens.

raiashutosh
Level 2

Re: Possible to change the <head> of an email after dynamic content has been defined?

Hi @Julz_James 

I am using the litmus tracking code in our email for further analysis. I am facing the same issue while adding the litmus code in the emails.
The code has to be added in the <body> tag of the email, however, if I add the email script token in one of the modules of my email template the Marketo editor strips of all the <style> tag and the code doesn't work. The code works only if I add the code just above the </body> tag using the edit code option but it is possible only when there is no dynamic content in the email.


Is there any way where I can use the dynamic content and also use the email script token?

Dean548
Level 2

Re: Possible to change the <head> of an email after dynamic content has been defined?

Hi,

I know this is an old thread but did you end up finding a fix for this? Im also experiencing the same problem where when I click save in the HTML Source editor Marketo strips also strips the anything in the <style> tags

Jasbir_Kaur
Level 5

Re: Possible to change the <head> of an email after dynamic content has been defined?

Hi @Dean548 

 

You have to remove the dynamic content only after that you can add something in the email editor.

 

Otherwise, if your email is connected with the template, you can edit the template and add it there if you want to add something in the style tag of your email and then just reapprove the email.

 

Hope this will solve your problem.

raiashutosh
Level 2

Re: Possible to change the <head> of an email after dynamic content has been defined?

Yes, I added a global variable for that element in the email template itself so that I can change it in the email editor as per the email requirements.

 

You can have a default value and change it as and when needed.
In the screenshot, you can see a variable for the litmus tracking pixel, which I had to add to each email.

raiashutosh_0-1730369173942.png

 

Thanks!