How to make a Realtime View Counter using JavaScript & Firebase

  Рет қаралды 15,507

Melvin Adekanye

Melvin Adekanye

Күн бұрын

How to make a Realtime View Counter using JavaScript & Firebase. Hey guys and gurls. I'll be showing how to make a realtime view counter. This could be used to count views on a video or visitors to your site or whatever you need to count in realtime. So let's begin.
Background Beat: Mac Miller ft. Tom Misch Type Beat ''REMIND'' - GC
Firebase: firebase.googl...
API: api.ipify.org/
Font Awesome: fontawesome.com/
Patreon: / rhymbil
Until next time
RhymBil Out.
HMU @rhymbilyt@gmail.com

Пікірлер: 58
@thedelanyo
@thedelanyo Жыл бұрын
Simple but great 👍🏿😃 tutorial. For those who don't want to write the for loop,, instead of replace(".", "-" ), you can do replaceAll
@MelvinAdekanye
@MelvinAdekanye Жыл бұрын
Great tip! You're so right.
@ihackedpiggy3212
@ihackedpiggy3212 4 жыл бұрын
Wait using the real-time fire base would it be possible to make the online chatapp
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
Yes. You could store messages and their sender. Then render it.
@nonthapat.j
@nonthapat.j 3 жыл бұрын
Help please it have this error: "@firebase/database: FIREBASE WARNING: Exception was thrown by user callback. TypeError: snapshot.numChildern is not a function" in console
@ebk_west
@ebk_west 4 жыл бұрын
Can u put the source code
@ihackedpiggy3212
@ihackedpiggy3212 4 жыл бұрын
Rhymbil Thank you!
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
No problem
@ashishnagle57
@ashishnagle57 4 жыл бұрын
This guy play fortnite
@paisalepra
@paisalepra 4 жыл бұрын
Hi Rhymbil awesome tutorial!! i have a doubt, what if i need to count every single hit that have my website? even if there is hit by the same ip several times
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
Oh Ok. So you want to count repeated visitors. For this you would need to create a random id that would be saved instead of the actual IP. In better terms your database should look similar to this: database | RANDOM ID | viewers_ ip: 192.168.82.0 // same user | RANDOM ID | viewers_ ip: 192.168.82.0 // same user | RANDOM ID | viewers_ ip: 192.168.89.9 // not same user But it will appear as 3 visitors. Which 2 of them are repeated.
@nonthapat.j
@nonthapat.j 3 жыл бұрын
@@MelvinAdekanye how to do it???
@busayo02
@busayo02 4 жыл бұрын
The counter doesn't reduce even after someone leaves the page. Is there a fix for this?
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
No. This isn't a current viewer counter. But rather a total views counter. Perfect for videos or viewing total traffic to your site. If you want to make a current view counter. You might want to look into web sockets with node.
@kaangoktan8536
@kaangoktan8536 2 жыл бұрын
@@MelvinAdekanye Can you make a current viewer counter tutorial? That would be awesome
@genigeekus
@genigeekus 2 жыл бұрын
can this work on a video when a peron views it? I was looking for something like this but under a video so that people can see how many people viewed a video
@MelvinAdekanye
@MelvinAdekanye 2 жыл бұрын
Of course!
@rangabharath4253
@rangabharath4253 3 жыл бұрын
awesome
@Deeni_Akhbar
@Deeni_Akhbar 10 ай бұрын
its not working for me can anyone help me
@DiimaPopov
@DiimaPopov 3 жыл бұрын
Thank you so much. It did work for me. Great job
@DiimaPopov
@DiimaPopov 3 жыл бұрын
Would be nice to see like button using js & firebase. Something like facebook like
@MelvinAdekanye
@MelvinAdekanye 3 жыл бұрын
You're very welcome. Maybe a like button for a comment section. For sure. I'll get on it.
@DiimaPopov
@DiimaPopov 3 жыл бұрын
@@MelvinAdekanye yeah that would be amazing
@jepfarragona
@jepfarragona 2 жыл бұрын
do you have an updated tutorial of this?
@MelvinAdekanye
@MelvinAdekanye 2 жыл бұрын
Coming soon.
@jepfarragona
@jepfarragona 2 жыл бұрын
looking forward to it.
@dhandayalprasad2267
@dhandayalprasad2267 4 жыл бұрын
Please make a video on how to make a leader-board with Firebase
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
For sure. You can expect it
@poopieness
@poopieness Жыл бұрын
Hi! I am doing a system where I have a Web Application for the Admin Side and Mobile Application for the Customer Side. How can display the count of views from the Mobile app to my Web App?
@DJVeryita
@DJVeryita 4 жыл бұрын
Hi, can i add this code to the default player HTML5? is for a proyect and i dont know how :/!!!!
@DJVeryita
@DJVeryita 4 жыл бұрын
i need to know how many persons are cnonected to a live hls stream :/
@burenbatturtogtoh5179
@burenbatturtogtoh5179 3 жыл бұрын
hi dear, this is really useful for me, but my count is not decreasing what should i do help me
@MelvinAdekanye
@MelvinAdekanye 3 жыл бұрын
You're welcome. It's not supposed to. It's only a lifetime counter. But you definitely can decrease it. For example. When the user exists the tab. You can delete their data from the database so it decreases the count.
@phihoanghong2473
@phihoanghong2473 3 жыл бұрын
thanks
@sherbertlemons7393
@sherbertlemons7393 2 жыл бұрын
Hi, it would be great if you could do an update to this video. Doesn't seem to work currently
@MelvinAdekanye
@MelvinAdekanye Жыл бұрын
Oh, okay. Thanks for the heads up.
@AbdirahimAli10
@AbdirahimAli10 4 жыл бұрын
how is it if you need to count how many times that ip is visiting you?
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
Let say you're trying to track traffic to your website. Or you have videos on your site and you need to count views like KZbin. Or you just want to get some practice with Firebase.
@AbdirahimAli10
@AbdirahimAli10 4 жыл бұрын
@@MelvinAdekanye i have a web page (de-centralization page) i need how many times is visited this page and which IP address is visited the most? thanks in advance
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
@@AbdirahimAli10 No problem
@LoLingVo
@LoLingVo 4 жыл бұрын
Does that cost anything?
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
Well, yes. Firebase is free to try out and great for small projects. But the costs appear when your database grows.
@Deeni_Akhbar
@Deeni_Akhbar 8 ай бұрын
provide source code pls
@jgbjbcvgcug5561
@jgbjbcvgcug5561 4 жыл бұрын
How to make a chatting app for brother school
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
You can view a previous video I made here: kzbin.info/www/bejne/iYLLk6uGp5l4isk
@digitsmartplus7121
@digitsmartplus7121 3 жыл бұрын
how to create like and dislike to firebase please
@MelvinAdekanye
@MelvinAdekanye 3 жыл бұрын
That would be a good video to make. But you can simply apply these methods to a like/dislike counter.
@kahuds
@kahuds 4 жыл бұрын
Could you release the source code?
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
The video is the source code. 🤣
@cikargt5187
@cikargt5187 2 жыл бұрын
it didnt write to database
@MelvinAdekanye
@MelvinAdekanye 2 жыл бұрын
Do you have any errors in your console?
@ebk_west
@ebk_west 4 жыл бұрын
it dont work
@ebk_west
@ebk_west 4 жыл бұрын
pls help
@codejoy9546
@codejoy9546 4 жыл бұрын
First
@MelvinAdekanye
@MelvinAdekanye 4 жыл бұрын
Second 😂
@codejoy9546
@codejoy9546 4 жыл бұрын
Hahaha
I built a chat app in 7 minutes with React & Firebase
8:53
Fireship
Рет қаралды 1,4 МЛН
Award Winning Animation With Only 20 Lines Of CSS?
6:59
Hyperplexed
Рет қаралды 1,8 МЛН
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 2,7 МЛН
Upload & Retrieve Image on Firebase Storage using JavaScript | English
16:17
The Amazing Codeverse
Рет қаралды 39 М.
Web Developer Reacts to Beautiful Portfolio Websites
14:52
Adrian Twarog
Рет қаралды 955 М.
Firestore Increment - Counters that Scale
3:58
Fireship
Рет қаралды 53 М.
10 CSS PRO Tips and Tricks you NEED to know
9:00
Coding2GO
Рет қаралды 19 М.
How to make a Login & Sign Up in HTML, JavaScript & Firebase
16:00
Melvin Adekanye
Рет қаралды 65 М.
Powerful JARVIS Using JavaScript | KNOWLEDGE DOCTOR | Voice Assistant
29:06
Animated Responsive Navbar with CSS - Plus Other Useful Tricks
11:40
Visitor Counter with Node.js and Express | JavaScript Tutorial
18:57
OpenJavaScript
Рет қаралды 10 М.
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17