Wistia Javascript API - conversion event to redirect to a confirmation page -
i'm using wistia's turnstile capture e-mail in end of video. problem redirect page after user clicks submit. message have request check e-mail confirm double opt-in.
i have tried using 2 embed types no sucess.
iframe:
<iframe src="//fast.wistia.net/embed/iframe/7zu6ze7v40?videofoam=true" allowtransparency="true" frameborder="0" scrolling="yes" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen id="my_wistia_video"></iframe> <script src="//fast.wistia.net/assets/external/iframe-api-v1.js"></script> <script> wistiaembed = document.getelementbyid("my_wistia_video").wistiaapi; wistiaembed.bind("conversion", function(type, val) { window.location.href == "http://the_page"; }); </script>
api:
<div id="wistia_7zu6ze7v40" class="wistia_embed" style="width:640px;height:508px;"> </div> <script charset="iso-8859-1" src="//fast.wistia.com/assets/external/e-v1.js"></script> <script> wistiaembed = wistia.embed("7zu6ze7v40", { videofoam: true }); wistiaembed.bind("conversion", function(type, val) { window.location.href == "http://the_page"; }); </script>
any hints or advices?
looks you're using comparing operator (a boolean operator) there ==
, , you'll want utilize single =
in place set window.location.href
in example. if you're curious more on comparing operators, check this w3 page.
anyhow, i'd recommend embed:
<div id="wistia_7zu6ze7v40" class="wistia_embed" style="width:640px;height:508px;"> </div> <script charset="iso-8859-1" src="//fast.wistia.com/assets/external/e-v1.js"></script> <script> wistiaembed = wistia.embed("7zu6ze7v40", { videofoam: true }); wistiaembed.bind("conversion", function(type, val) { window.location.href = "http://the_page"; }); </script>
javascript wistia
No comments:
Post a Comment