Here, we'll walk through a step-by-step guide for adding a download countdown timer script in blogger.

How to Add Download Timer for Blogger
Download Timer for Blogger


Before going deep, you should know what is a download timer, why you should use it. We are going to list down all of the pros and cons of a download timer.  


What is a Download Timer and How it Works?

If you want to provide a downloadable file to your user, you lock that file into a download timer for a number of seconds. After that specified time ends, the file is ready to be downloaded. 

A download countdown timer is a very beneficial way to increase your website session duration. Also, it helps to increase your ads revenue as you are showing ads on top and bottom of the timer.


Why you Should Use Download Timer?

Here are why you should consider using a download timer in blogger, points are listed below:

  1. Increases session duration. This might increase your Google rankings
  2. Great for blogger based websites that provide downloadable resources  
  3. Improves your Adsense revenue when your ads are show on top and bottom of the timer
  4. After the timer hits '0', the user will be automatically redirected to the destination page


How to Add Download Countdown Timer in Blogger

Here is the download timer script:


<br />
Enter Adsense code here
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<script>
   var count = 15; // Number of remaining seconds.
   var counter; // Handle for the countdown event.
   
   function start() {
    counter = setInterval(timer, 1000);
   }


   function timer() {
    // Show the number of remaining seconds on the web page.
    var output = document.getElementById("displaySeconds");
    output.innerHTML = count;
    
    // Decrease the remaining number of seconds by one.
    count--;
    
    // Check if the counter has reached zero.
    if (count < 0) { // If the counter has reached zero...
     // Stop the counter.
     clearInterval(counter);
     
     // Start the download.
     window.location.href = "Enter your download link here";
     return;
    }
   }  
   // Start the countdown timer when the page loads. 
   window.addEventListener("load", start, false);
  </script>


<br /><b>
<h2>Your download will begin in <span id="displaySeconds">15</span> seconds.</h2><br />
<br />
Enter Adsense code here
<br /><br /></b></div>


  • Login to your blogger dashboard
  • Go to "Pages" and create a new one
  • Now, go to the "HTML View"
  • Paste the above script there
  • Replace "Enter Your Adsense Code Here" with your Adsense ad code
  • Now Publish your page


Conclusion

This might be feeling uncomfortable for new bloggers but don't worry we are with you. Just comment me your query. I would be uploading more tips and scripts related to blogger and Wordpress.