Re: Forms 2.0 and Not Rendering with Embed

Anonymous
Not applicable
Has anyone else experienced the forms 2.0 embed on a non Marketo page not rendering due to security issues via proxies? We have found that it gets blocked on our internal network, which we can unblock, but I would think most corporate companies in the world use some kind of proxy that could block the forms. This is a major problem to using that functionality (which I love). I don't know if there is a solution. 
Tags (1)
12 REPLIES 12
Justin_Cooperm2
Level 10

One of our engineers has seen this with a few customers in the past. Here is some guidance:

*.marketo.com urls are often blocked by spam filters / adblock etc, because they (correctly) identify what marketo does as tracking.  This has happened for a long time with certain adblockers we've came across, and it seems like maybe some firewalls are now doing it too.

The easiest/best workaround is to change those urls to your CNAME instead.  For instance if your CNAME was go.company.com, the original embed script:

<script src="//app-aba.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_1"></form>

<script>MktoForms2.loadForm("//app-aba.marketo.com", "XXX-XXX-XXX", 1);</script>

Would become:

<script src="http://go.company.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_1"></form>

<script>MktoForms2.loadForm("http://go.company.com", "XXX-XXX-XXX", 1);</script>

This has the advantage that your domain will not be filtered out by things that are filtering out Marketo includes. It does have the disadvantage that it does not use a CDN to serve the JS assets, so it can potentially be slower to load.  Another disadvantage is that you may not have a https cert for your CNAME, in which case the embed script wouldn't work on https pages.

SanfordWhiteman
Level 10 - Community Moderator

If you look at the AdBlock Easy Privacy List, you'll see mktoresp.com but not marketo.com.

I'd venture that if someone is trying to block marketo.com via privacy plug-ins or proxies, it isn't because they think the form post itself is bad, but because they consider Marketo bad guys in general (because of Mkto's separate use of tracking pixels and/or as an ESP).  Any attempt to evade that technology is counter to the user's (or IT group's) wishes and IMO ethically questionable.

Perhaps just as important, as Justin notes, using the CNAME will be way slower to load.  It's already hard enough to handle form posts and *.mktoresp.com Munchkin hits internationally; if you can't even load the core scripts via CDN you're going to feel that hit.  So I think the wider solution, leaving aside ethics concerns, is either to [a] steer go.company.com through your own CDN or [b] fall back to the CNAME only if forms2.js didn't load.  Easy to check for the existence of the MktoForms2 ​object and retry w/CNAME if it's not found.

Anonymous
Not applicable

I am now seeing the CDATA problem too and none of the replies have fixed the problem.  Is there any other suggestions?

SanfordWhiteman
Level 10 - Community Moderator

What's the URL?

Anonymous
Not applicable
If it helps anyone, here's the blog post with the form embedded at the bottom. Feel free to view the source!
http://garysmithpartnership.com/sales-pipeline-charts-salesforce-dashboard/

Gary
Anonymous
Not applicable
I'm also having this problem and have tried both adding the header and https. Neither are working for me.
Like the users above I can get Gary's to work so not sure what's going on.


I had to do a hard refresh (Ctrl + F5) to get my changes active and sure enough the combo of the Header tag and explicitly calling the src files over https did the trick.
Anonymous
Not applicable
Yes, I have https://  in both the src and the load form.   Actually, I contacted Marketo support and the problem was that I needed this in the header of my page:
<head>
<meta charset="UTF-8">
</head>

 
Anonymous
Not applicable
I was experiencing a similar issue with forms.min.js throwing a regex error and added the https:// to my forms to resolve it.
Nancy_Demers1
Level 1
Has anyone found an answer to this issue?  I tried Gary S code in this small HTML and his works, but my forms from both sandbox and production environments will not render render.
The first 2 are my forms, the last is Gary's.   Is there maybe a setting within Marketo that allows the forms to be visible outside of a Marketo Landing Page?

<!DOCTYPE html>
<html>
<body>
<h1>My Web Page</h1>
<script src="https://app-sj07.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1003"></form>
<script>// <![CDATA[
MktoForms2.loadForm("https://app-sj07.marketo.com", "195-WCT-232", 1003);
// ]]</script>

<script src="https://app-ab02.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_2"></form>
<script>// <![CDATA[
MktoForms2.loadForm("https://app-ab02.marketo.com", "591-WJW-115", 2);
// ]]></script>

<script src="https://app-lon03.marketo.com/js/forms2/js/forms2.js"></script>
<form id="mktoForm_1012"></form>
<script>// <![CDATA[
MktoForms2.loadForm("https://app-lon03.marketo.com", "660-GVK-255", 1012);
// ]]></script>
</body>
</html>
Anonymous
Not applicable
We had the problem that the form wasn't displaying in either the preview web page or the live version. Not sure if it's the same issue you're having. We solved it by entering https:// before the form references. As per the example below. 

<script src="https://app-lon03.marketo.com/js/forms2/js/forms2.js"></script>
<form id="mktoForm_1012"></form>
<script>// <![CDATA[
MktoForms2.loadForm("https://app-lon03.marketo.com", "660-GVK-255", 1012);
// ]]></script>
Anonymous
Not applicable
Yes. I ended up logging a ticket with support and it has been escalated to engineering and they are working on it. Basically, my company's network proxy is stripping out the Marketo script. So, any large organization that uses the same proxy we do or maybe others the form embed code won't display. 
Anna_Blanchet1
Level 4
We're having the same issue. Has anyone responded to your message?