marketo landing page locked content code example

Example: marketo landing page locked content

//FORM PAGE CUSTOM HEADER HTML
<script src="forms2.min.js"></script><script>MktoForms2.whenReady(function(form){form.onSuccess(function(vals,tyURL){document.location.href = 'MYURL?CHECKSTRING=VALUE';return false;});});</script>

//CONTENT PAGE CUSTOM HEADER HTML (Requires jQuery)
<style>body{display:none;}</style><script type="text/javascript">$(document).ready(function(){var o="MYURL";if(parent.document.location.href.indexOf("marketodesigner")>-1)$("body").css("display","block");else{var e=function(o){var e,t,n=window.location.search.substring(1).split("&");for(t=0;t<n.length;t++)if((e=n[t].split("="))[0]===o)return void 0===e[1]||decodeURIComponent(e[1])}("CHECKSTRING");void 0===e?document.location.href=o:"VALUE"!=e?document.location.href=o:$("body").css("display","block")}});</script>

Tags:

Misc Example