Professional Premium and Free Blogger Templates 2020
Free download some awesome
SEO Friendly, Responsvie and Fast Loading free blogger templates. Get the best blogger themes in fixtemplate.blogspot.com




How To Display Post Views Counter in Blogger Post in 2021

Posting Komentar
post views script for blogspot

Many blogspot users have been looking for ways to display post views count in blog. 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 mistake. You have got no issues with this as you can see 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. 

Related Posts

Posting Komentar