This is a functionality you'd want to use if you'd like to have the same embed code place in different pages, and also redirecting to different pages after it is watched. Here's how to do it: 

You'd need to modify your embed code to make it look like this: 

<div id="vidalytics_embed_iqAonHuf91lYUDQ7" style="width: 100%; position:relative; padding-top: 56.25%;"></div>
        <script type="text/javascript">
          var _vidalyticsOverridenOptions = {
            init: {
              onPlaybackEndRedirectUrl: 'https://vidalytics.com'
            }
          };
          (function (v, i, d, a, l, y, t, c, s) {
              y='_'+d.toLowerCase();c=d+'L';if(!v[d]){v[d]={};}if(!v[c]){v[c]={};}if(!v[y]){v[y]={};}var vl='Loader',vli=v[y][vl],vsl=v[c][vl + 'Script'],vlf=v[c][vl + 'Loaded'],ve='Embed';
              if (!vsl){vsl=function(u,cb){
                  if(t){cb();return;}s=i.createElement("script");s.type="text/javascript";s.async=1;s.src=u;
                  if(s.readyState){s.onreadystatechange=function(){if(s.readyState==="loaded"||s.readyState=="complete"){s.onreadystatechange=null;vlf=1;cb();}};}else{s.onload=function(){vlf=1;cb();};}
                  i.getElementsByTagName("head")[0].appendChild(s);
              };}
              vsl(l+'loader.min.js',function(){if(!vli){var vlc=v[c][vl];vli=new vlc();}vli.loadScript(l+'player.min.js',function(){var vec=v[d][ve];t=new vec();t.run(a, _vidalyticsOverridenOptions);});});
          })(window, document, 'Vidalytics', 'vidalytics_embed_iqAonHuf91lYUDQ7', 'https://quick.vidalytics.com/embeds/9052_jeM/iqAonHuf91lYUDQ7/');
        </script>
    </div>              

Note that the first part of the original script was modified to add

var _vidalyticsOverridenOptions = {
            init: {
              onPlaybackEndRedirectUrl: 'https://vidalytics.com'
            }
          };

And that's there's also one extra change in the embed code itself, where it uses the new variable “_vidalyticsOverridenOptions”.

See a working demo here.

Did this answer your question?