Ads Box Widget With Refresh Function For Blogger

Ads Box Widget With Refresh Function For Blogger. Good night bloggers, I am back for other tutorial. In this chance, I will share about Ads Box Widget for your blog. This is just simple ads box with refresh function. This widget will be changed when visitors refresh your blog. For example, Someone visit your blog, he will see one ads on your sidebar then, he click the other page and the add will be showing others. So, you can add some ads on your blog with place it in one widget box. It is important to display one widget to get more advantage.


The workings of this widget code similar to Google Adsense script, that banner ads will appear automatically turns to the other banner after someone reloading or refreshing the page. In this code I provide 3 placement of banners as an example. You can change it by your own.
This way of installation on your blog :
  • You only have to add a HTML/Javascript Gadget.
  • Copy the code below.
  • Paste on your HTML/Javascript box.
  • Finally, click save and see the result.
<script type="text/javascript">
var blogokay_id = 3;
var blogokay_now = new Date()
var detik = blogokay_now.getSeconds()
var blogokay_place = detik % blogokay_id;
blogokay_place += 1;
if (blogokay_place == 1) {
  url = "LINK DESTINATION";
  alt = "ADS DESCRIPTION";
  title = "ADS TITLE";
  banner = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3mrIJcr02B0QN-8SHZCT9m6COvSsaLPwbnLKYEsXmkQ9waKyn2ElANGz5OzsCClRxqSm9TldODbF6nZIyv-70WfeFO5eoqKiSDLNAkN2lwI1RQCZcSAHGDnXx8_nuQYexRZ8H3GQZUN4D/s1600/okay.png";
  width = "300";
  height = "250";
}
if (blogokay_place == 2) {
  url = "LINK DESTINATION";
  alt = "ADS DESCRIPTION";
  title = "ADS TITLE";
  banner = "http://lh3.googleusercontent.com/-rN3S3y7f5X4/AAAAAAAAAAI/AAAAAAAAAPM/OHZIrmzgYRQ/s512-c/photo.jpg";
  width = "300";
  height = "250";
}
if (blogokay_place == 3) {
  url = "LINK DESTINATION";
  alt = "ADS DESCRIPTION";
  title = "ADS TITLE";
  banner = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtWU0NYTi9Zy89s9pPyIx2U0edOW1DITR0ZaoCABFukJhUfQSIyKOt1EWD0yqqEzTgQM-zOUBntsaNHGJIoVHunN7WoASyTh_ZjC1FFWfTX78rBSvmb8hP6ogo6Ju1OtdG-4lRsVwRtwHw/s1600/twitterblogokay.png";
  width = "300";
  height = "250";
}
document.write('<a href=\"' + url + '\" target=\"_blank\" rel=\"nofollow\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('title=\"' + title + '\" alt=\"' + alt + '\"></a>');
</script>

For Customization

For example : if you want to show the five ads in this box. Change the code var blogokay_id = 3; With var blogokay_id = 4; 

Next, add the script below in appropriate place to show the five ads in the box. Don't forget to replace important part that I've marked.

if (blogokay_place == 4) {
 
url = "LINK DESTINATION";
  alt = "ADS DESCRIPTION";
  title = "ADS TITLE";
  banner = "URL BANNER";
  width = "300";
  height = "250";
}


It's easy enough to implement. If you are still confused and any quesrtion please leave a comment below. I will help you to apply it. Thanks for reading article about Ads Box Widget With Refresh Function For Blogger.
Advertisement

Tidak ada komentar