Good Samaritans,
I'm stuck on a challenge with Forms on Landing page. I've created a landing page on marketo (imported template), uploaded a report file (pdf) that I need to lock behind the form for easy, one-click download post form-fill. How do I achieve that?
Thanks,
Shyam
"Locking" is a bit optimistic here, given that Marketo-hosted assets don't require a login and if you know the asset URL, you can provide it to others (of course, you can also provide the asset itself if it's just a PDF!).
But if you want to gate the asset without redirecting to it immediately, you'd still set the PDF's URL as the Thank You URL, but use the Forms2 API to stop the page from redirecting entirely to the PDF (which isn't the greatest UX anyway). Then set the href of an existing <a> tag to the PDF URL.
A compressed example:
<style type="text/css">
#assetDownload { display: none; }
#assetDownload.downloadReady { display: block; }
</style>
<a id="assetDownload" href="#">Download Now</a>
<script>
MktoForms2.whenReady(function(form){
form.onSuccess(function(vals,tyURL){
assetDownload.href = tyURL;
assetDownload.className += ' downloadReady';
return false;
});
});
</script>
If you want a page>Form>ty page with link then
you may need a Trigger Campaign to manage the journey based on this form fill.
Recommend putting PDF on your main website for load balancing.
Also, check docs.marketo.com and University as there are good examples of the above.