Overview
When a Marketo form embedded as an event in a Vidyard player is set to skip known leads, Vidyard makes an API call to ask Marketo whether or not a viewer is known.
If the Vidyard player is set to autoplay, Vidyard may not be able to retrieve the information from Marketo quickly enough in order to determine if the lead is known and therefore close the Marketo lead capture form.
Solution
This problem can be resolved by adding a simple code into the custom HTML of the Marketo form. The code allows Marketo to determine if the viewer is known first and then close the form if necessary.
- Navigate to the Lead Capture Form settings in Marketo
- Under the field If Known Visitor, Show, use the dropdown menu to select Custom HTML
- Click the pencil icon next to the field
- Paste the following code into the text editor
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> Welcome back, {{lead.FirstName}} {{lead.LastName}} <br /> <br /> <button id="button_close" onclick="closefunction()">Close</button> <br /> <br />{{form.NotYou:default=Not you?}} <br /> <script type="text/javascript"> // <![CDATA[ $(document).ready(function() { API.closeCta(); }); function closefunction() { API.closeCta(); } // ]]> </script>