-->

Ads Box Widget With Refresh Function For Blogger

- 08:10
advertise here
advertise here
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/AVvXsEhq12WiUt4csYDJXuvsYJhtFAbFjYAvub8L5Akj4xUspS8zR-Uhx8VQtezC-jd1R4kaIy4xzax3l_6oPukreQvY5Y8i5SFbyCExstY9QiA9CLsG8-eAIKPmxPNg7OzH8pFdr-W9oRNE5e3W/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/AVvXsEgyxUqRANpHkAJTzgieK6_L1Kamsr_sw_rlwz6-Tqp0AVeKzygxyiomxR8noPNWxcuQYE5jRnnKTkc5qlAQjtSSUxwUuLfVvJq3Z9EqR7zO2iNpZbPXthicLnr8BhchTagEu8uFxabYb66j/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 advertise here


EmoticonEmoticon

 

Start typing and press Enter to search