Has anyone had issues with embedded forms not showing?
- Our CNAME is set and the code has been updated appropriately.
- We have an SSL certificate set on our Marketo assets, so it shouldn't be a mixed content issue.
It shows on the backend of our website but not the front end. I have been going back and forth with Marketo support for almost two days with no progess, so looking to see if anyone else has experienced this and found a solution.
Thanks!
Solved! Go to Solution.
Not much of a mystery here! The cause is straightforward.
Checking your F12 Console, you'll see this error:
That's because you're trying to use the global MktoForms2 object before it exists. And the reason it doesn't exist is you've added the defer attribute to the script tag (it's not there by default):
<script src="//go.datadimensions.com/js/forms2/js/forms2.min.js" defer></script>
defer — by design — does not load the script immediately, instead deferring it to a background fetch.
This means in the very next inline <script>, when you try to run MktoForms2.loadForm, it fails. This is expected behavior.
While defer means loading an external JS file won't block rendering of your page, it also means you need your code to be aware that you're defer-ing. You can't just add in that attribute without potentially upsetting things.
You will have to provide a link for someone to see what you're seeing.
The page it is supposed to be showing on is https://datadimensions.com/contact/.
The form that you do see is NOT a Marketo form because we have to have a functioning form available.
Not much of a mystery here! The cause is straightforward.
Checking your F12 Console, you'll see this error:
That's because you're trying to use the global MktoForms2 object before it exists. And the reason it doesn't exist is you've added the defer attribute to the script tag (it's not there by default):
<script src="//go.datadimensions.com/js/forms2/js/forms2.min.js" defer></script>
defer — by design — does not load the script immediately, instead deferring it to a background fetch.
This means in the very next inline <script>, when you try to run MktoForms2.loadForm, it fails. This is expected behavior.
While defer means loading an external JS file won't block rendering of your page, it also means you need your code to be aware that you're defer-ing. You can't just add in that attribute without potentially upsetting things.
@Jonathan_Haines please come back and check your thread, thanks.