The JavaScript goes within a HTML page element. Please drag from the right hand side and then drop anywhere in the landing page.
A quick glance is not very convincing the code is going to work as it is.
It may need additional handling for your Marketo, such as a CSS overriding form.lpeRegForm ul.