For a lot of our pages we're now using Guided Templates because it allows for a responsive design, but I've come across an issue with adding custom HTML. With the free-form templates we had a tool for adding custom HTML, but my understanding is that this no longer exists in guided templates. (The available editable elements are image, form, text, video, share button, poll, referral, sweepstake and snippet.) This poses a unique problem when trying to add a custom conversion tag to a specific page. We can't add the conversion code to the template itself because it is intended for a specific page, whereas templates are typically intended to be used with multiple pages, hence the name template. However, if we try to use the rich text editor and switch over to HTML mode to add code, it strips out all <script> tags and replaces them with <mce:script>, quite effectively killing anything within the tags.
Am I completely missing something here, is there a funky work-around, or am I just out of luck and need to choose either a Responsive Design or a Conversion Code?
Solved! Go to Solution.
This is the same thing Justin mentioned, but I'll be a bit more explicit in case you need things spelled out like I usually do.
You can add your own string variables to templates by adding meta code in the header. To add an HTML element to a page, you can use the code below and a Custom Body HTML will appear in the Variables section of the template:
<meta class="mktoString" mktoName="Custom BODY HTML" id="customBodyHtml1" allowHtml="true">
The only catch is it's not like the baked in custom HTML element. It's a one line field just like the other variable fields, so as Justin also mentioned, it's really more suited to small amounts of code, though I've stuck fairly long scripts in there with no issue.
Here's some documentation on creating your own guided templates:
Getting Started With Guided Landing Pages
Create a Guided Landing Page Template
Editing Marketo Guided Landing Page Templates, Pt. 1 - Elements
Editing Marketo Guided Landing Page Templates, Pt. 2 - Variables
I do not see anything in the docs
https://docs.marketo.com/display/public/DOCS/Create+a+Guided+Landing+Page
about this situation. I suspect that the script needs to be in the Template to be accepted. You may have to use the Free Form Template to do what you want.
It's not possible, yet there quite a few items in the community on this. I wrote a comment here on how to add Google Universal analytics tags on forms in a template in this discussion Re: Struggling to add GA event to a Marketo Landing Page just a couple of hours ago (adding the code to the form is more reliable than the conversion code on the follow-up page)
Also some ideas :
-Greg
If it's a small amount of script you can use a string variable for this.
This is the same thing Justin mentioned, but I'll be a bit more explicit in case you need things spelled out like I usually do.
You can add your own string variables to templates by adding meta code in the header. To add an HTML element to a page, you can use the code below and a Custom Body HTML will appear in the Variables section of the template:
<meta class="mktoString" mktoName="Custom BODY HTML" id="customBodyHtml1" allowHtml="true">
The only catch is it's not like the baked in custom HTML element. It's a one line field just like the other variable fields, so as Justin also mentioned, it's really more suited to small amounts of code, though I've stuck fairly long scripts in there with no issue.
Here's some documentation on creating your own guided templates:
Getting Started With Guided Landing Pages
Create a Guided Landing Page Template
Editing Marketo Guided Landing Page Templates, Pt. 1 - Elements
Editing Marketo Guided Landing Page Templates, Pt. 2 - Variables
Sorry for not tagging this sooner, still new to this interface. This is EXACTLY what I was looking for and worked like a charm. allowHTML="true" was the magic word. Thank you!