Can I dynamically insert the player in my page using Javascript?

Yes, but you can't use jQuery.

ShowHeroes Monetize avatar
Written by ShowHeroes Monetize
Updated yesterday

Yes you can insert the player in your page, but avoid using jQuery.

Use the code below and insert your unit code (ZID) where highlighted.

<div id="viralize-script-container"></div>
<script type="text/javascript" id="viralizeinjectionscript">
   var zid='YOUR UNIT ZID';  
   var container=document.getElementById('viralize-script-container');
   var newScript=document.createElement('script');  
   newScript.src='https://ads.viralize.tv/display/?zid=' + zid;
   newScript.type = 'text/javascript';  
   newScript.setAttribute('data-wid', 'auto');
   container.appendChild(newScript);
</script>


Please remember: the way jQuery adds the script in the page is not compatible with Viralize player.

Did this answer your question?