-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeeksBLaBla stats #137
Comments
Yeah, I think it's possible using Facebook graph API https://developers.facebook.com/docs/graph-api/reference/video/video_insights/ |
also, we can get podcast platforms analytics using anchor account, unfortunately, the only solution is to scrap data using cypress 😀(no open API for anchor) |
You can get videos info from group as well https://developers.facebook.com/docs/graph-api/reference/v7.0/group/videos |
@kafiil We want to get number of views and listeners! we need to get them from Facebook, youtube and anchor |
In Case someone interested to work on this. lets me know if you need more info? |
@ismailElazizi any idea when we need to add stats ( in the statistics section, the home page ) or for every episode card? |
@yjose @aboullaite if possible, I would like to work on adding a |
Yeah @zakariaelas Go ahead, but I think calculating views in the build time is better for page performance, take as example the 'blabla' page, i think it would be very slow as you need to fetch views for 50 episode at once, also fetching views require adding fb sdk to page which will increase load time too. Regarding your point of view, i think it would be acceptable to update views every week as we need to rebuild the website on adding new episodes. |
Thank you @yjose for the clear explanation. At first I thought the views count would appear on the detail view of every episode, which motivated a bit the idea behind realtime fetching. However, I totally agree with what you mentioned, and your approach is better 👌. |
I would love if you can add it on episode card and episode view too. |
Upon further inspection, it turns out the FB Graph API does not support stats for videos in facebook groups, but it does for pages.
This would imply that some of the episodes would have an empty view count as not all episodes come from the facebook page. What do you think @yjose ? |
Hmm , I see Maybe we can return an estimation for group videos, as you said this is a limitation from Facebook, so nothing we can do here. I would recommend returning a random number between 2000 - 4000 views in groups Video 😁 , What you think? |
Sounds good to me @yjose . I can't say much on the numbers though because I don't know if Facebook allows you to see the views count on their app as an administrator. I think it's definitely better than leaving other episodes' view count as blank. On a side note, one of the administrators of the page will need to acquire an access token and add it as an env variable. This is because facebook only allows admins of a page to query for video insights.
Why do we need a user access token AND a page access token? Just in case you are wondering just like I did, this answered it for me:
|
thank you @zakariaelas for the great explanation, will generate tokens and back to you |
@yjose you're welcome 👍 . I played a bit with the positioning of the views count. Initially, I thought about having an "eye" icon just to save up some space, but I'm not sure how you guys would get the svg for that. Anyways, please let me know what you think. Would love to hear other suggestions 😃 . |
I think your solution is clean. Go gor it, i would recommend using x.x k format ( 2.1k) for episode with views more than 1k. For the card. I am ok with it |
@zakariaelas Unfortunately we need to wait for Facebook app review to make sure the access token will work as expected. this is something new that Facebook has implemented in the last few months due to all the data leaking controversy 😏 |
@yjose thank you for the feedback. It's okay, i'll just keep working on my fork until you hear back from facebook 👍👌 |
This is more of a discussion. Is there a way where we can get metrics and stats about viewers/listeners? How many hours people have watched/listened ?
The text was updated successfully, but these errors were encountered: