How to Add Post Views Count




How to Add Post Views Count
Login to blogger, Enter to THEME, Then select Edit HTML
Make sure you have installed Jquery Librery and Font Awesome CDN on your blog if not then paste it just below all meta tags or just below <head> tag.
<!-- Jquery Library and Font Awesome CDN --> <script src='https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js'/> <link crossorigin='anonymous' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css' integrity='sha256-46qynGAkLSFpVbEBog43gvNhfrOj+BmwXdxFgVK/Kvc=' rel='stylesheet'/>


Copy below code then paste in before  <data:post.body/>


<b:if cond='data:view.isPost'><span class='post-view' expr:data-id='data:post.id'><span class='view-load' id='postviews'><i class='fas fa-spinner fa-pulse faa-fast'/></span>Views</span></b:if>

Paste This Script above in your HTML as shown below.

<script type='text/javascript'> /*! bloggerbyte-Firebase-post-view */ jQuery.getScript("//cdn.firebase.com/js/client/2.3.2/firebase.js").done(function(){$.each($(".post-view[data-id]"),function(e,a){var i=$(a).parent().find("#postviews").addClass("view-load"),t=new Firebase("https://md-count-view.firebaseio.com/pages/id/"+$(a).attr("data-id"));t.once("value",function(e){var o=e.val(),d=!1;null==o&amp;&amp;((o={}).value=0,o.url=window.location.href,o.id=$(a).attr("data-id"),d=!0),i.removeClass("view-load").text(o.value),o.value++,"/"!=window.location.pathname&amp;&amp;(d?t.set(o):t.child("value").set(o.value))})})}); </script>

If you have done above, click save.

Themes for Members

Powerful & High Quality

The reason why choosing our premium template.

AMP HTML

A cool Template is available that supports valid AMP HTML

RESPONSIVE

Responsive Optimized for your blog that adapts to all devices

SEO FRIENDLY

SEO Ready templates built with the best SEO practice in mind

ADSENSE OPTIMIZED

Easily place your Adsense ads to increase your revenue

FAST LOADING

The template loading speed is well optimized and very perfect

Subscribe & Social Media

Follow us via email or social media below

avatar
Admin Welcome to Netralid, if you have anything to ask please via our WhatsApp
:
counter customizable free hit