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

jendaytwo
Level 2

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. 

 

12 REPLIES 12
SanfordWhiteman
Level 10 - Community Moderator

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).

jendaytwo
Level 2

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#M4...

SanfordWhiteman
Level 10 - Community Moderator

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#M4...


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.

jendaytwo
Level 2

Hi @SanfordWhiteman 

 

So I am thinking more about this approach and it seems that we will want them to go to the landing page and not the resource center card and on this page they will get either a form or a KV message. Can we then place the resource behind the download or submit button on that landing page and still have correct attribution?

 

If the company really wants the resource to be exposed on the resource card level what tricks would we need to implement? Are you able to assist?

SanfordWhiteman
Level 10 - Community Moderator

So I am thinking more about this approach and it seems that we will want them to go to the landing page and not the resource center card and on this page they will get either a form or a KV message. Can we then place the resource behind the download or submit button on that landing page and still have correct attribution?

If you reenable referrer and query string tracking in KV HTML mode, yes.

 


If the company really wants the resource to be exposed on the resource card level what tricks would we need to implement? Are you able to assist?

Depends on what you mean by assist I think :), it’s something that needs to be coordinated with your dev team.

jendaytwo
Level 2

@SanfordWhiteman 

 

Thanks for your reply.

 

1. If you reenable referrer and query string tracking in KV HTML mode, yes.

 

Please explain what this code is doing...

 

2. My dev team is trying to understand how to hook into the marketo cookie to associate someone as a KV and then serve them the asset. My understanding is that with KV the form is filled behind the scenes and when you click the normal form submit button it then creates a record in Marketo that the form for that asset was filled out.

 

Is there a way to create a dual-action submit whereby submitting the form is submitted and the asset is presented?

SanfordWhiteman
Level 10 - Community Moderator

1. If you reenable referrer and query string tracking in KV HTML mode, yes.

 

Please explain what this code is doing...


It adds hidden fields from the referrer URL’s query string, the current URL’s query string, or from Cookie — the exact same effect you get with the built-in AutoFill feature for hidden fields, but that feature is disabled in KV HTML mode.

 


2. My dev team is trying to understand how to hook into the marketo cookie to associate someone as a KV and then serve them the asset. 

I don’t understand what “hook into the Marketo cookie” means here?

 


My understanding is that with KV the form is filled behind the scenes and when you click the normal form submit button it then creates a record in Marketo that the form for that asset was filled out.

I wouldn’t say the form is “filled behind the scenes” with KV HTML.

 

The KV HTML renders a visible form. It just happens to only have a Submit button. There are no other fields, except for the typical hidden field w/the Munchkin cookie and operational fields like the form ID. When you press the Submit button, the form is submitted.

 

Since the only way to see the KV HTML in the first place is to have an associated cookie, Marketo simply uses the cookie to figure out which record gets the Filled Out Form activity in its Activity Log.

 


Is there a way to create a dual-action submit whereby submitting the form is submitted and the asset is presented?

If the asset, say a PDF, is the Thank You URL for the form, then it’ll be opened when the form is submitted. That’s the default behavior, already works like this.

jendaytwo
Level 2

Hi @SanfordWhiteman 

 


@SanfordWhiteman wrote:

1. If you reenable referrer and query string tracking in KV HTML mode, yes.

 

Please explain what this code is doing...


It adds hidden fields from the referrer URL’s query string, the current URL’s query string, or from Cookie — the exact same effect you get with the built-in AutoFill feature for hidden fields, but that feature is disabled in KV HTML mode.

 

So in that query string you are able to see that they are a known visitor? Or is the Marketo cookie the recognizing factor?

 


2. My dev team is trying to understand how to hook into the marketo cookie to associate someone as a KV and then serve them the asset. 

I don’t understand what “hook into the Marketo cookie” means here?

 

Let me try to explain...my developers don't understand how to examine the marketo cookie that has the hidden values to make the known visitor attribution. But perhaps they don't need to if your code does all of this for them?

 


My understanding is that with KV the form is filled behind the scenes and when you click the normal form submit button it then creates a record in Marketo that the form for that asset was filled out.

I wouldn’t say the form is “filled behind the scenes” with KV HTML.

 

The KV HTML renders a visible form. It just happens to only have a Submit button. There are no other fields, except for the typical hidden field w/the Munchkin cookie and operational fields like the form ID. When you press the Submit button, the form is submitted.

 

Ok thanks for the more thorough explanation

 

Since the only way to see the KV HTML in the first place is to have an associated cookie, Marketo simply uses the cookie to figure out which record gets the Filled Out Form activity in its Activity Log.

 

Gotcha!

 


Is there a way to create a dual-action submit whereby submitting the form is submitted and the asset is presented?

If the asset, say a PDF, is the Thank You URL for the form, then it’ll be opened when the form is submitted. That’s the default behavior, already works like this.

 


No in this case we want the asset TO BE THE THANK YOU "URL". As in the form is filled and instead of directing to the thank you page the redirect is to the asset itself

Thanks again for your help here

 

 

SanfordWhiteman
Level 10 - Community Moderator
There's no need to restate in all caps, since I've understood the scenario from the beginning.

As noted above, if you set the Thank You URL to the asset itself (the binary asset) in Form Editor, the form redirects to the asset.

Marketo forms already work like this.
jendaytwo
Level 2

Hi @SanfordWhiteman 

 

First so sorry for the caps it was really because I was placing emphasis, not screaming. The WYSIWIG here is not easy to use especially when you are trying to respond inline to copy/paste text.  

 

So here is the other issue then...

 

We had planned to use one form for all of our assets. Would we need to switch to a 1-1 ratio (assets-forms) in this scenario?

 

Thank you!

SanfordWhiteman
Level 10 - Community Moderator

You can use just one form. You switch the Thank You URL (the asset) based on a field on the form like Last Requested Asset.

Phillip_Wild
Level 10

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!