-
-
Notifications
You must be signed in to change notification settings - Fork 8
number of people currently viewing an article #18
Comments
If you are looking into real time solutions: https://github.com/amark/gun has been pretty good for me so far. |
@TheHollidayInn have you ever seen this used with Google Analytics data? Is there an open source implementation you could point to? That could save us a lot of time. |
Ah, I think using something like Gun would be closer to a homemade solution. It looks like Using the Google Analytics Real Time Data api to filter by the current page would work as well! I can create a PR for that if this issue is open. |
@TheHollidayInn Yes - if we can figure out a way to do this using the API without having to keep an intermediary database, that would be much simpler. We would welcome a PR for this, if you want to take a crack at it :) |
Something to note, there is a limit to the analytics real time api (also it is in beta):
I may be wrong, but does this exceed your traffic expectations? The limit is pretty small for a real time approach. |
@TheHollidayInn We could get the activity for all the pages once every 10 seconds, and that would be less than 10,000 requests a day. That would be near-instantaneous enough for our features. We could then stream those data to the open pages. Honestly, I have no idea how to do this, but I know that sites like lichess.org have really good real-time analytics on how many games are going on, how many people are watching a game, etc. We'd like to have similar metrics for freeCodeCamp News. Maybe Google Analytics is the wrong approach. |
Sounds good! Let me start with that. Doing this is not too difficult. I can still try with google analytics, and it would probably work. Another option is using socket.io, but we would need to a server to serve the websocket connection. I'm pretty sure gatsby is only static. |
@TheHollidayInn OK - great! Thanks for looking into this. We might be able to add a component that isn't static. Kind of like how our full text search bar works even though it's embedded into a static Gatsby page. |
Np! I just meant that it is static in the sense that it doesn't have a server (it still has interactive js). |
@TheHollidayInn OK - it sounds like we're on the same page then :) |
No description provided.
The text was updated successfully, but these errors were encountered: