Veedi is a popular way to monetize your gaming website. Veedi works by placing a walkthrough video of the game on your website. You make 70% of the revenue that the video generates through advertisements.

On the forum, there were several users looking to integrate Veedi into their websites, and the solution is rather simple. Veedi can be hooked into either the MyArcadePlugin API to retrieve the game name or it can be called using a native WordPress function. For this tutorial, I will use native WordPress functions but keep in mind that you can use the MyArcadePlugin API.

Example Code

<div class="veediInit"><script type="text/javascript" id="veediInit">
var _v,settings = {
game : "<?php the_title(); ?>", // Game name (Variable)
publisherId : 74654141, // Publisher ID (provided by our side)
onVideoFound : function() {
// perform an action if video found
},
onVideoNotFound : function() {
// perform an action if video NOT found
},
width : 300 // Veedi player width
};
(function(settings) {
var vScript = document.createElement('script');
vScript.type = 'text/javascript';
vScript.async = true;
vScript.src = 'http://www.veedi.com/player/embed/veediEmbed.js';
vScript.onload = function(){
_v = new VeediEmbed(settings);
};
var veedi = document.getElementById('veediInit');
veedi.parentNode.insertBefore(vScript, veedi);
})(settings);
</script></div>

The above code is what I used to implement the code onto my own website. As you can see to call the game name I used the WordPress function <?php the_title(); ?>. Now it will show the correct video on every game.

*Red text is what you replace with your own settings such as the width and the publisher ID*

What About For The API?

The reason that this integration did not use the API was because many of the themes are using different versions of the MyArcadePlugin API and this is the best way to get the player to function properly.

Limitations

Some of the limitations with, this integration is that for users using a language other than English it will not load. The Veedi player will only recognize games with an English title, if you are not an English Website, you will have some issues with this integration.