Follow Me

Installing the Ad Box Widget with Refresh Function

Installing the Ad Box Widget with Refresh Function
Installing the Ad Box Widget with Refresh Function - Good night, blogger friend, again Arlina Design shared the tutorial before in the next post, maybe I will share a template that is Vikka 2, which I will soon launch.

This tutorial is related to the usual ad box widget you install with HTML code. But in this tutorial I will provide a way to install ad boxes with other methods, namely with a lightweight JavaScript code for blogs.

The workings of the widget code are similar to the Google Adsense script, that is, the ad banner will automatically turn to another banner after you reload or refresh the page. In this code I provide 3 banner placements that you can later add as needed.

Following Tutorial How to Install the Ad Box Widget with Refresh Function

1. Login to Blogger> Layout> Create a new widget> Then add the code below to the new widget
<script type="text/javascript">
var arldgzn_id = 3;
var arldgzn_now = new Date()
var detik = arldgzn_now.getSeconds()
var arldgzn_place = detik % arldgzn_id;
arldgzn_place += 1;
if (arldgzn_place == 1) {
url = "LINK TUJUAN";
alt = "DESKRIPSI IKLAN";
title = "JUDUL IKLAN";
banner = "BANNER IKLAN";
width = "300";
height = "250";
}
if (arldgzn_place == 2) {
url = "LINK TUJUAN";
alt = "DESKRIPSI IKLAN";
title = "JUDUL IKLAN";
banner = "BANNER IKLAN";
width = "300";
height = "250";
}
if (arldgzn_place == 3) {
url = "LINK TUJUAN";
alt = "DESKRIPSI IKLAN";
title = "JUDUL IKLAN";
banner = "BANNER IKLAN";
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>
Please fill in your friend's information. To add a banner, please add the code below in the code above. For example, I will add the banner code to four

Change the var code arldgzn_id = 3; with var arldgzn_id = 4;
var arldgzn_id = 4;

if (arldgzn_place == 4) {
url = "LINK TUJUAN";
alt = "DESKRIPSI IKLAN";
title = "JUDUL IKLAN";
banner = "BANNER IKLAN";
width = "300";
height = "250";
}

To change the size of the banner, please specify width = "300"; and height = "250"; in the code above as needed.

2. Save the widget and see the results.
Results
Easy enough isn't it? That's the tutorial on How to Install the Ad Box Widget with the Refresh Function on the blog. Hopefully useful and successful greetings.
Next Post Previous Post
No Comment
Add Comment
comment url