I do not see anything in the docs
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 :
If it's a small amount of script you can use a string variable for this.
2 of 2 people found this helpful
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:
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!