Must fill out form first

Naomi_Marr1
Level 2

Re: Must fill out form first

Thanks you, Sanford.

I think this is exactly what I was looking for! I've added it to the top of the thank you page and I've updated the URLs in the script to reflect my pages but for some reason it's refreshing to our homepage instead of redirecting back to the Registration page. Why is that? Do I need to change some other attribute of the script?

Link to Registration page: Get inside the Mix of Anastacia

Link to Thank You page: http://connect.avid.com/ty-test.html

Thank you in advance for your help!

Sanford Whiteman

SanfordWhiteman
Level 10 - Community Moderator

Re: Must fill out form first

You put in the full URL when the pathname is just looking for the relpath to the page (like '/signin-test.html').

Naomi_Marr1
Level 2

Re: Must fill out form first

I made that change but now I think what it's doing now is going in an infinite loop. When you load this page it never resolves but keeps trying to do so.

http://connect.avid.com/ty-test.html Sanford Whiteman

SanfordWhiteman
Level 10 - Community Moderator

Re: Must fill out form first

I think you have the logic off:

     if ( referrer.pathname != '/signin-test.html' ) document.location.pathname = '/ty-test.html';

You've made it so that if the previous page wasn't /signin-test.html then send the person to /ty-test.html -- the current page.  Thus the infinite loop.

You want

     if ( referrer.pathname != '/signin-test.html' ) document.location.pathname = '/signin-test.html';

Elliott_Lowe1
Level 9 - Champion Alumni

Re: Must fill out form first

At my previous company , we had a video hosted on Vimeo and using dynamic content in Marketo, we were able to allow a lead to view a video one time.  If they wanted to view it again, they needed to submit a form again.  It's been a couple of years since I did this, so I don't recall all of the particulars, but at least this can be done.

SanfordWhiteman
Level 10 - Community Moderator

Re: Must fill out form first

That's a good point about non-Marketo-hosted assets -- in fact the expiring links I'm talking are based on looping in technology outside Marketo. Maybe Naomi's videos are hosted somewhere that has a view-once policy (that does seem kind of punitive, though, if it's really one time ever) that could be enforced by specially crafting links using a webhook.

Elliott_Lowe1
Level 9 - Champion Alumni

Re: Must fill out form first

As I recall the process was that Sales used Add to Marketo Campaign in Sales Insight to invoke a smart campaign that added the authorized lead to a static list and sent the lead an authorization email with a link to a LP.  Then when the lead visited the LP, it pulled in dynamic content with the video in the Vimeo player whose settings restricted viewing by the general public.  For leads that were not on the list, the LP pulled in a message stating that the lead should contact their account rep to get authorized.  After that, we removed the lead from the static list, so they could play the video multiple times, but could not play it again once the LP was closed and reloaded. You could change this to removing them from the static list after a certain period of time.

This technique does not prevent someone else from viewing the video if the original recipient forwards the tracked link without clicking it.  If whomever they forwarded the link to clicks the link first, they would be allowed to view the video and the original recipient would not be able to view the video after that.

Kenny_Elkington
Marketo Employee

Re: Must fill out form first

Hi Naomi,

I'm curious what your intent is here?  Do you want to prevent the lead from viewing the video if the lead is unknown, or do you want to force the lead to fill out the form if that specific form hasn't been filled out before?

Naomi_Marr1
Level 2

Re: Must fill out form first

I want to force the person to fill out the form regardless of if they're known or not so it's truly gated to everyone.