Infolinks

Infolinks
Sponsored by Infolinks

How to add Post View plugin to Blogger Blogspot - Blogger Plugins

Get you blogger post view or Blogger Statistics live on your post, for actual post view by the user. Here is

How to add Post View plugin to Blogger Blogspot - Blogger Plugins

How to add Post View plugin to Blogger Blogspot - Blogger Plugins



Blogger a platform full of customization as we all know blogger doesn't provide any plugins to add something easily as just like Wordpress. Bloggers which uses WordPress for blogging, will not have to do effort or work as compared to bloggers on Blogger.

As they have just plugins, by default to just direct use with particular blogs or website. Let me tell you that is the result by which they are able to add extra features such as SEO tool, Post view tool, Javascript, CSS minifier etc.

Will Bloggers are not able to add plugins?

Yes, bloggers user cannot use plugins because there are no any plugins available to use in blogger. But, if you're using blogger as your blogging platform then you are also able to do all these things just by using simple HTML, Javascript, CSS to add all these plugins.

So, today in this post I have come up with another blogger plugins that is How to add Post View plugin to Blogger Blogspot? 


See Also - Free SEO Plugin for blogger blog 

Now coming up on our Post view plugin, you have to follow up my instructions for successfully adding the post view plugin on your blog.

I am sure you have searched it on the internet for this code but didn't get any successful code to implement on your blog, Now you are in right place, so let's get started..

Demo


For adding this code to your blog you have to Firebase and there create an account. Click Here To create the account on firebase

After creating the account on Firebase.com.





  • You need to create your app by clicking on the new project.
  • After clicking on the new project you will see a window like this
    • Enter your project name, and copy your product id from here.
    • and just enter your country name and accept the terms&conditions
    • than click on Create project.
                  Go to Blogger dashboard >> Back up your template >> Click on Edit HTML  

    HTML

    Find (ctrl+f)  <data:post.body/>  and paste the given code before it.
    <a expr:name='data:post.id'/> <i class='fa fa-eye'/> <span id='postviews'/> Views

    JScript

    Find (ctrl+f) </body>
    Copy the following code and paste it before </body>
    <script src='https://cdn.firebase.com/v0/firebase.js' type='text/javascript'/> 
    <script> 
    $.each($(&#39;a[name]&#39;), function(i, e) { 
    var elem = $(e).parent().find(&#39;#postviews&#39;); 
    var blogStats = new Firebase(&quot;https://YOUR-APP-NAME.firebaseio.com/pages/id/&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; 
    data.id = $(e).attr(&#39;name&#39;); 
    isnew = true; 
    } 
    elem.text(data.value); 
    data.value++; 
    if(window.location.pathname!=&#39;/&#39;) 
    { 
    if(isnew) 
    blogStats.set(data); 
    else 
    blogStats.child(&#39;value&#39;).set(data.value); 
    } 
    }); 
    }); 
    </script>
    

    *Customization- Replace the YOUR-APP-NAME with your project id that you have copied during creating your project.

     Now, you are done, just Save Your Template and enjoy. You have successfully added your post view plugin.

    Final Words

    Woah! you have successfully done the work, now its time to visit your blog and see live on your blog. Don't forget to use or Blogger SEO plugin Free SEO Blogger Plugin by Tech Guru Aditya Pal
    Hope you guys enjoyed this post :)  

    Under Tags: Blogger Statistics,blogger,blogger (website),Blogspot,how to,add facebook page plugin to blogger,how to add facebook page plugin to blogger,add random posts widget to blogger,use/add Yoast SEO plugin on Blogspot,add social button to blogger,Yoast plugin for blogger,add social sharing buttons inside blogger post,add categories to blogger,how to add Instagram button to blogger,add social media icons to Blogspot

    Post a Comment

    0 Comments