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 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 ContinueStage 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 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($('a[name]'), function(i, e) {
var elem = $(e).parent().find('#postviews');
var blogStatsblog stats = new Firebase("https://fir-1-cbfb4-default-rtdb.firebaseio.com/pages/id/" + $(e).attr('name'));
blogStats.once('value', 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('name');
isnw = true;
}
elem.text(data.value);
data.value++;
if(window.location.pathname!='/')
{
if(isnew)
blogStats.set(data);
else
blogStats.child('value').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