Mobile app version of vmapp.org
Login or Join
Pierce454

: How to get youtube-style ads in adsense on website? I've seen some websites use a new style of ads from Adsense, they take the entire page and make you wait X seconds before being able to

@Pierce454

Posted in: #Advertising #GoogleAdsense

I've seen some websites use a new style of ads from Adsense, they take the entire page and make you wait X seconds before being able to skip it.

I thought it's the page-level ads of Adsense, however the page-level ads are only for mobile, while I get these ads on my laptop. They look like this:


Does anybody have any ideas what ads these are and how I can get them too?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Pierce454

1 Comments

Sorted by latest first Latest Oldest Best

 

@Samaraweera270

I was curious about them too, so digging a bit into that website, the kind of ads they are using are possible by Google IMA SDK for HTML5, it


allows developers to request and track VAST ads in a HTML5 video environment.


Here is the relevant javascript code of the website:

o.elem.onclick=function(){
want_play||play_btn.disabled||(
want_play=!0,play_btn_click_mtm=Date.now(),play_btn.setEnabled(!1),spinner_shown=nick.disabled=!0,ldmc.style.display="inline",
play_count++,
3<=play_count &&
!is_mobile&&adsController &&
(shoa=!0,adsController.initialize(),adsController.requestAds("https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/136317422/slither-io-game-over&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=http%3A%2F%2Fslither.io&correlator=[timestamp]")))};


So it shows the advertisements after the player loses 3 times. They are using the sdk library:

<script type="text/javascript" src="//imasdk.googleapis.com/js/sdkloader/outstream.js"></script>


and using an AdsController to display them:

<script type="text/javascript">
var ocho = document.getElementById('ocho');
var adsController = null;
try {
adsController = new google.outstream.AdsController(ocho, oalo, oadu);
} catch (e) {

}
ocho.style.display = 'none';
ocho.style.visibility = '';
</script>


That makes it possible to use overlay ads in desktop versions of a website using some html5 elements.


You may want to associate your in-page HTML and Flash ad slots with
video or overlay ad slots. This relationship between associated ad
slots is referred to as the master/companion relationship. In addition
to being used for requesting video and overlay master ads, the IMA SDK
can be used to display companion HTML and Flash-in-Flash ads. These
ads are displayed within an HTML environment, alongside other Flash
content, or within a Flash website.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme