Advanced Download Timer Script for Free

free script download timer

Add a download timer script in your posts or articles and reduce bounce rate and increase earnings at the same time. It will consists of some easy steps no matter you are using a blogger or WordPress even a costume built site.

Add Timer in Posts before Download

Install a Plugin or find code

In the case of WordPress, you have to install a plugin named “Insert Header and Footer”.

If you are on blogger or custom site you have to find ending body tags in your HTML.

Paste the code

Found ending body tag? Good. Now copy the below tag and paste right above < / body > or in the case of WordPress plugin paste this code in the third box.

<script>
var downloadButton = document.getElementById("download");
var counter = 10;
var newElement = document.createElement("p");
newElement.innerHTML = "You can download the file in 10 seconds.";
var id;
downloadButton.parentNode.replaceChild(newElement, downloadButton);
id = setInterval(function() {
counter--;
if(counter < 0) {
newElement.parentNode.replaceChild(downloadButton, newElement);
clearInterval(id);
} else {
newElement.innerHTML = "You can download the file in " + counter.toString() + " seconds.";
}}, 1000);
</script>

Apply Timer in posts

Now the final step is when you are providing the download link you have to give it an id.

Edit your post via HTML or Text editor and paste the given code right after the button tag in case you are using a button or make a div tag.

id="download"

Leave a Comment

Your email address will not be published. Required fields are marked *

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.