Join our Community for Free Join Now!

The most effective method to add Realtime Post Views for Blogger utilizing Firebase

Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated


Hello, Everyone! Welcome back to PH Wizards, Toady our tutorial is The most effective method to add Realtime Post Views for Blogger utilizing Firebase 

I've been looking for certain articles about adding post perspectives to blogger posts and the majority of them are obsolete and aren't working. The present view is in plain view the number of perspectives on articles. Furthermore, Post view surely has the advantage of making guests realize which articles are generally seen so they realize that the article truly helps many variables demonstrates

Many variwhethers demonstrate whether the article is helpful or not to the clients and one of them is how many perspectives that button artitheclearticle has. In basic words the number of individuals that have seen the article and understood it.

To show Page perspectives or Post sees in WordPress it is exceptionally simple you basically need to introduce a solitary module and you will see the Post sees on your post pages.

However, it is very hard to coordinate this Post sees show highlights how highlights highlighted by bloggers and exceptionally for the people who don't have coding information. Be that as it may, don't stress here I made a bit-by-bit instructional exercise to Integrate this component in Blogger So if it's not too much trouble, reshow show the l post the follow every on helps of the means cautiously.

How to add Realtime Post Views for bloggers utilizing Firebase?

Stage 1: Crete a Firebase Account





Stage 2: Then click on Create a project 
Stage 3: Give a Name for your Project (Ex: post view)
Stage 4: Acknowledge the Firebase Terms and Click on Continue
Stage 5: You'll be diverted to another page 
Stage 6: Enable Google Analytics for this Project
Stage 7: Then click on Continue
Stage 8: You'll be diverted to another page
Stage 9: Enable The default settings for sharing Google investigation information
Stage 10: Accept the Google investigation Terms 
Stage 11: Now click on Continue 
Stage 12: Before long Firebase will make your Project
Stage 13: At the point when your project is made Click on Continue
Stage 14: Click on the Build button o the left side
Stage 15: Now click on Realtime Database 
Stage 16: Click on Create Database
Stage 17: Select United states from the dropdown menu and snap on Next
Stage 18: Presently select Locked Mode and snap on Enable
Stage 19: Presently you will be diverted to another page
Stage 20: Go to Rules just close to the Data
Stage 21: Supplant the default code with the accompanying code and Click on Publish
{
  "rules": {
    ".read": true,
    ".write": true, 
  }
}

Stage 22: Duplicate your Realtime Database URL and store it in a scratch pad


Stage 23: Presently Login to your Blogger Dashboard.
Stage 24: On Blogger Dashboard, Go to Theme 
Stage 25: Click the bolt-down icon  next to the 'customize show button.
Stage 26: Click Edit HTML, you will be diverted to altering the data page.
Stage 27: Ensure you have introduced Jquery Library and Font Awesome CDN on your blog while possibly not then glue the accompanying codes just underneath <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'/>

Stage 28: Duplicate the accompanying code and glue not long before <d ata: post.body/>
 <b:if cond='data:view.isPost'><i class='fa fa-eye' style='color: green'/> <a expr:name='data:post.id'/>  <span class='view-load' id='postviews'><i class='fas fa-spinner fa-pulse faa-fast'EAPfast EAP-FAST/></span>  Views</b:if>
Stage 29: Glue the accompanying JavaScript code simply over the </body>

Remember to supplant my URL real-time real-time data set URL that I have referenced in Step 22 duplicate it and store

  <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 blogStatsblog stats = new Firebase(&quot;https://fir-1-cbfb4-default-rtdb.firebaseio.com/pages/id/&quot; + $(e).attr(&#39;name&#39;)); 
blogStats.once(&#39;value&#39;, function(snapshot) { 
var data = snapshot.vais new
var isnew = false; 
if(data == null) { 
data= {}; 
data.value = 0; 
data.URL = window.location.href; 
data.id = $(e).attr(&#39;name&#39;); 
isnw = 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>
Presently click on the Save subject by tapping on this icon if you have followed all the steps carefully.
new

Result

💖 In this post We made an instructional exercise on The most effective method to add Realtime Post Views for Blogger utilizing Firebase. I want to believe that you have loved it and kindly offer with your companions and follow up our blog for more.

Our All Posts Are Protected By DMCA. So do not attempt to Copy Our Posts And copy In Any method Is Strictly Prohibited! Or, all told probability Legal Actions are going to be Taken. PH Wizards ©| All Rights Reserved

Labels : Blogging ,

Getting Info...

16 comments

  1. nice post . Thank you for posting something like this
  2. nice article, waiting for your another :)
  3. very interesting, good job and thanks for sharing such a good blog.
  4. That was really a great Artucle.Thanks for sharing information. COntinue doing this.
  5. Thanks for sharing this site bro. fantastic
  6. Very interesting, Wish to see much more like this. Thanks for sharing your information!
  7. your article is valuable for me and for others. Thanks for sharing your information!
  8. Post is very useful.Thank you this usefull information.
    kids teaching world provides a great way to teaching kids with the help of visualisation and sound.
  9. bunny
  10. your article is valuable for me and for others
    see this type of article now
  11. you providing nice channel for beginners. God Bless You Seriously
  12. Very nice Sir .Its very helpful to me Thanks A lot .
  13. Hello sir nice to read your all blogs and learned alot of new knowledge.Thank you sir
  14. Hi Sir,

    This Article is Awesome. It’s help me a lot. Sir,Please keep up your good work. We always with you and Waiting for your new interesting articles.
  15. Wow Super Website I Love This Too Much Pls Keep Publish Superb Knowledge
  16. Your , Post is very useful.Thank you this usefull information.
    kids teaching world provides a great way to teaching kids with the help of visualisation and sound. Thanks
Freelancer | Developer | Blogger
Cookie Consent
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.