Advertisement

How To Display Post Views Counter in Blogger Post 2021 Tips - Chinaitechghana

China iTech Ghana
Friday, May 7, 2021 | views Last Updated 2021-05-07T09:57:30Z


Here is How To Display Post Views Counter in Blogger 2021?

Many Blogspot users have been looking for ways to display post views count in blogs. They really thought getting blogger post views counter script is a big deal but no, anybody can add post views counter to their blogger template. All you need to do is just follow the steps below without making any mistakes. You have got no issues with this as you can see in the demo from our blog. 


How To Add Post Views Counter to Blogger.
  • Login to your blogger dashboard and navigate to the Theme.
  • Click on the (drop-down menu) arrow beside the "CUSTOMIZE" button.
  • Click on Edit HTML.
  • On the HTML console, search for </body> alternatively, you can scroll to the end of the codes, then you will see the </body> right above </html>.
  • Paste the following script right above the </body>
<script src='https://cdn.firebase.com/v0/firebase.js' type='text/javascript'></script>
<script>
//<![CDATA[
$.each($(".post-view[data-id]"),function(h,e){var a=$(e).parent().find("#postviews").addClass("view-load"),g=new Firebase("https://view-post-da9db.firebaseio.com/pages/id/"+$(e).attr("data-id"));g.once("value",function(d){var b=d.val(),c=!1;null==b&&(b={},b.value=0,b.url=window.location.href,b.id=$(e).attr("data-id"),c=!0),a.removeClass("view-load").text(b.value),b.value++,"/"!=window.location.pathname&&(c?g.set(b):g.child("value").set(b.value))})});
//]]>
</script>

After pasting the script, apply the below code, anywhere you want the Blogspot post view counter to appear around your post.

<span class='post-view' expr:data-id='data:post.id'></span><i class='far fa-eye'/> <span class='view-load' id='postviews'/> views
You can then check any of your posts to see the post views counter working.

If you got any issues or questions, feel free to use the comment box. 

Enter Your Email Address to Recieve Our Latest Updates:

Delivered by Chinaitechghana.com

Comments
comments that appear entirely the responsibility of commentators as regulated by the ITE Law
  • How To Display Post Views Counter in Blogger Post 2021 Tips - Chinaitechghana

Trending Now

Recents

Advertisement