Getting error:(Property 'MktoForms2' does not exist on type 'Window & typeof globalThis') on using react with typescript
useEffect(() => { window.MktoForms2.loadForm("//app-sj11.marketo.com", "XXX-XXX-XXX", 1608);
}, []); 1 Answer
You are likely to get that error if the actual MktoForms2 library hasn't been loaded yet. That should be loaded like this, before you try and make the loadForm call..
<script src="//"></script>The domain that the script gets loaded from is specific to your Marketo instance, but you can find the documentation for the form library here: