How to Display Post Views Count in each post of Blogger

 If you want to keep track of your posts or you want to know if your website has anyone interacting with it? The simplest way is to integrate the article with the view checking feature, so you will easily know the number of views on each blog post on your blogger website. 

How to Display Post Views Count in each post of BloggerHow to Display Post Views Count in each post of Blogger

Using this feature, readers can determine the quality of the article thanks to the number of views and they will feel more secure and want to click to the blog post to read when the number of views is higher than the others. So, in this article, I will guide you how to count post views in blogger. Now, let’s take a look.

Creating your Firebase Account

1. Signup to Firebase

*You will be redirected to your dashboard once you successfully signed up{alertSuccess}

2. Then, create your Firebase APP. To create your Firebase APP Go to

3. Click on Create Project button.

4. Type your Project Name ( You can type your website's name as your project name).

5. Accept Firebase Terms. Then, click on Continue button.

6. Click on Continue button.

7. Accept Google Analytics Terms. Then, click on Create project button. Firebase will be create your project.

8. When your project is ready click on Continue button.

9. Click on the Build menu on lefthand side.

10. Click on the Realtime Database menu button.

11. To store and sync data in real time you have to create to realtime database. Click on the Create Database button to create your firebase realtime database.

12. Now setup your Database Database Option - Select your Realtime Database location, where your Realtime Database will be stored. Then, click on the Next.

13. Security Rules - Select Start in Locked mode. Then enable by clicking Enable button. Once you have defined your data structure you will have to write rules to secure your data.

14. Firebase App URL created. Congratulations! You have successfully created a WORKING Database.

15. Click on Rules menu.

16. You have to change read and write rules.

17. Change read and write rules : false to true.

18. Then, Publish changes rules.

*Don't forget to copy your Firebase App URL. Return to Blogger.{alertSuccess}

 After successfully firebase project creation, we will enter the final step of adding HTML, CSS and JavaScript codes in blogger.

19. Go to Blogger » Template » Backup your Template » and Edit HTML

<link crossorigin='anonymous' href='' integrity='sha256-46qynGAkLSFpVbEBog43gvNhfrOj+BmwXdxFgVK/Kvc=' rel='stylesheet'/>{codeBox}

20. Add FontAwesome before </header>.

<script src=''/>{codeBox}

21. Add Jquery Library v1.2.3 or higher before </header>.

<script src=''/>{codeBox}

22. Copy this code then paste it before <data:post.body/> *or anywhere you'd like it to appear inside your Blog Post.

<a expr:name=''/> <i class='fa fa-eye'/> <span id='postviews'/> Views{codeBox}

23. JavaScript - Find (ctrl+f) </body>. Copy the following code and paste it before </body>.

<script src='' type='text/javascript'/>


$.each($(&#39;a[name]&#39;), function(i, e) {

var elem = $(e).parent().find(&#39;#postviews&#39;);

var blogStats = new Firebase(&quot;; + $(e).attr(&#39;name&#39;));

blogStats.once(&#39;value&#39;, function(snapshot) {

var data = snapshot.val();

var isnew = false;

if(data == null) {

data= {};

data.value = 0;

data.url = window.location.href; = $(e).attr(&#39;name&#39;);

isnew = true;














24. Replace YOUR-APP-NAME with your Firebase App URL. Save your template.

Congratulations! Now your Post Views Count in Blogger posts has been added.

Anas Ibn Yousuf

Hi Everyone, I am Anas from Kerala, One of the owners of PDFuploads. I have 8 Years of experience in Blogging.

Previous Post Next Post



نموذج الاتصال