Providing an asset directly from a landing page and recording that consumpton | Community
Skip to main content
New Participant
July 13, 2021
Question

Providing an asset directly from a landing page and recording that consumpton

  • July 13, 2021
  • 2 replies
  • 4554 views

Hello,

 

I have a scenario that I am not sure will work from a reporting standpoint:

 

  • Known user (we have smart forms Known Visitor HTML enabled) comes to our Resources landing page and clicks on the card that would then open a resource landing page with a form. 
  • We know who they are so we don't want them to go to that landing page and then click a download button to get the form.
  • INSTEAD we want them to directly open the gated PDF file in a new tab

Can this be done? Also, this scenario is only for long-form content that we have hosted in Marketo. 

 

2 replies

SanfordWhiteman
New Participant
July 14, 2021

This is pretty simple. It does requires a modicum of JS.

 

The only supported way to tell if someone has an associated session is (ironically, perhaps) to load a hidden Marketo form with KV HTML enabled and, in a whenReady() function see if the the KV HTML was rendered.

 

So you do that when the page loads, and modify the card click behavior accordingly (this may mean simply switching the href and target of an <a> tag or something else, depends on how clicks on the card are being processed now).

jendaytwoAuthor
New Participant
July 16, 2021

Hi @sanfordwhiteman thanks for the reply. So I would follow this idea in this post here?:

 

https://nation.marketo.com/t5/product-blogs/auto-submitting-a-form-for-known-visitors/bc-p/242668#M412

SanfordWhiteman
New Participant
July 16, 2021

So I would follow this idea in this post here?:

https://nation.marketo.com/t5/product-blogs/auto-submitting-a-form-for-known-visitors/bc-p/242668#M412


That wasn’t exactly what I was thinking, because you want code that will run whether or not the visitor is known but will tell you whether they’re known.

 

You do that by checking which, er, form of the form is rendered.

 

The code in that post only runs if the visitor is known, since the script is inside the KV HTML. So you’d have to use a sort of “absence of evidence“ approach which is more fragile IMO.

New Participant
July 14, 2021

Given the person would be identified, you could use Javascript to look for the existence of the Marketo cookie, and then direct someone accordingly. Seems possible with some dev help.

 

Sorry, that sort of coding is beyond me though!