How to Show Post Views in Blogger
How to show post views in blogger

Post Views refer to the number of times a specific post on a website, such as a blog post or article, has been viewed by users.

When a user visits a website and views a post, the website’s server will typically record this as a view. These views can then be accumulated and displayed on the website, either on the post itself or on a separate page, such as a statistics page.

Post Views can be an important metric for website owners and bloggers as it can indicate the level of engagement and interest in their content.

High post views can indicate that a post is popular and resonating well with users, whereas low post views may indicate that a post is not as engaging or relevant.

Some website platforms and content management systems, such as WordPress, have built-in functionality to track post views, but there are also external plugins and scripts that can be added to the website to track views.

Additionally, many website analytics tools, such as Google Analytics, can provide data on the number of post views.

It’s important to note that there are different ways to count views and some views might be counted multiple times, for example, if a user refreshes the page.

There are many factors that tell whether the article is useful or not and one of them is how many views that article has. It shows how many people have read that article.

To show page or post views in WordPress is very easy you just simply have to install a single plugin and you will see the post views on your post pages.

It is quite difficult for blogger users to show post views on their website but don’t worry I am here to resolve all your issues and solve all your difficulties related to blogger.

In WordPress, you have to buy hosting and you can create databases in that hosting but for blogger, you don’t have to buy any hosting for this page views counter functionality we will need to have a database.

Don’t worry you will not have to buy hosting we will use firebase which provides us free database management system and we can create as many databases as we want for free without paying a cent.

The procedure to implement this functionality in blogger is somehow difficult so that’s why I have created a separate video in which you can see and easily add post views counter functionality in the blogger website.

Video About How to show Post Views In Blogger

So the code which you will need or that I have used in this video is provided below simply copy the code and make the changes that I have made.

Code to get blogger post id.

<div expr:post-id=''/>

You have to add the above code after the below code.

<b:includable id='post' var='post'>

Code To show Page Views.

    #views-container #page-views 
        margin-left: 5px;
<span id="views-container"><i class="fa fa-eye"></i><span id="page-views"></span></span>

You have to add the code provided below before </head>tag if you want to show eye icon.

<link rel="stylesheet" href=""/>

Copy the code given below and paste it above </body> tag.

<script src='' type='text/javascript'/>
const convertSize = function (t) 
    const o = ["", "KB", "MB", "GB", "TB"];
    if (0 == t) return "0";
    const n = parseInt(Math.floor(Math.log(t) / Math.log(1024)));
    return 0 == n ? t + " " + o[n] : (t / Math.pow(1024, n)).toFixed(1) + " " + o[n];
$.each($("div[post-id]"), function (i, e) 
    var blogStats = new Firebase("" + $(e).attr("post-id"));
    blogStats.once("value", function (snapshot) 
        var data = snapshot.val();
        var isnew = false;
        if (data == null) 
            data = ;
            data.value = 0;
            data.url = window.location.href;
   = $(e).attr("post-id");
            isnew = true;
        if (window.location.pathname != "") 
            if (isnew) blogStats.set(data);
            else blogStats.child("value").set(data.value);

If you will not see the video then you will not be able to add a page or post views functionality in blogger so watch it first before doing any step by yourself.

I hope that you will like this article and please leave your feedback in the comment section below.