How to alert user that he is the ___th visitor of blogger/blogspot blog?


Read {count} times since 2020

If you ever visited my blog on the day it’s reaching a big view (24000 , 25000) you will get a javascript alert saying you are the 24000th visitor like this :

The above image shows that the blog alerted when the user was the 23000 visitor. It will also change the background to this. Want to have this feature on your blog ??? You are in the right place.

Requirements

One Stats Widget (Only one).

Add this code before  if you haven’t yet added a script src of Jquery Library.

Add this Code before tag.

if($('#Stats1_totalCount').text()=='25000 '){ $('body').css({background: "#111 url(//themes.googleusercontent.com/image?id=0BwVBOzw_-hbMYWRiZmQ3NDctZGQyZC00MWU0LWE0ZDMtMGFlZWI0MWM4NzQ1) repeat-x fixed top center /* Credit: michieldb (http://www.istockphoto.com/googleimages.php?id=4252213&platform=blogger) */"}, 900); if(localStorage[$('body').css({background: "#111 url(//themes.googleusercontent.com/image?id=0BwVBOzw_-hbMYWRiZmQ3NDctZGQyZC00MWU0LWE0ZDMtMGFlZWI0MWM4NzQ1) repeat-x fixed top center /* Credit: michieldb (http://www.istockphoto.com/googleimages.php?id=4252213&platform=blogger) */"}, 900);if(localStorage["a"+$("#Stats1_totalCount").text().substr(0, 4)]=='s'){}else{ alert("Congratulations, You are our '+$("#Stats1_totalCount").text()+'Vistor !!!!!");
localStorage["a"+$("#Stats1_totalCount").text().substr(0, 4)] = 's';}}

Replace the orange colored number the next upcoming milestone stat of your blog.
Note :- You have to do the steps mentioned above every time when your blog is going to reach the milestone.