How to get views by people that are subscribed to your channel? - youtube-analytics-api

I was surprised to not find a subscribed dimension listed given how prominently this pivot is featured in the analytics UI.
The insightTrafficSourceType dimension will give you people that arrived at your video through various 'subscriber' entry points, but this isn't the same as views by subscribers.
Is there another way to do this?
Context: I'm looking into understanding how our content is doing at getting subscribers over time and I'd like to show the team subscribe rate (new subscribers gained / unsubscribed views)

Related

Proper state management architecture to implement read/unread of items

Context: We are implementing a news app. For now, you can assume the news to be the same across all users, and maintains an order based on the parameters we set (according to trends, and date).
Problem: We are not sure what the best implementation for keeping track of what users read is. We want to be able to configure a way in which we can track what users read and what they didn’t.
Assumption: You can assume that the posts in the database are in a descending order, based on time.
So, the ideal scenario is that: when there are posts: A,B,C,D,E fetched from the server in the app, and the user read A,B. Now the user only gets to see C,D,E when they check for next posts. If they do previous, they see posts in the following order B-> A.
Furthermore, when P,Q is added to the database, now, the user must see next posts in the order of P->Q->C->D->E and so on.
Example: Let us assume there are 20 news in our app right now, and Gavin picks up his phone and starts reading from our app. In midst of his usage, he finds himself occupied with some other work, so quits the app after reading 5 news posts.
The challenge for us now is to figure the best way to make sure Gavin doesn’t have to re-read the 5 posts he already did.
One way we thought we could solve this problem is through use of index. We can assume uniform ordering for our posts as mentioned in the context, so we could use an index to track where Gavin was last in the order of news and show him news based on that index.
However, one problem with that approach is, we could easily have 5 new posts when Gavin picks up his phone and uses our app again. So, if we have the news based on date, technically that indexing approach means that we omit 5 unread new posts instead of the 5 read old ones.
We've also thought of maintaining three lists: Read, Unread and New so that we fetch only posts that are not in our lists. For example, in my initial example: A-B-C-D-E is in unread initially. Then, after user reads A-B, read becomes A-B. Meanwhile, when P-Q is added in the database, P-Q is added to the list of unread posts as P-Q-C-D-E.
How do you solve this problem? Any suggestions are welcome as we kind of think we're not thinking out of box when it comes to a solution for the problem. Thank you! :)
As i first read problem the solution ends up in my mind is also having 2 different list read unread and new ones are added to end of unread ones and unread list is shown in reverse order so most recent ones are on the top. However is it the most efficient way? Discussible. For example if number of new number increases a lot, then will be memory inefficient. But i assume small numbers in general.

group chat approaches for crowds

I'm planning to write a group chat platform to use in crowded situations, like events, parties or shows, for example.
the simple approach would be to put everybody in the same room. but having a thousand people talking in a same room doesn't work. the multiple possible parallel conversations overlap and none can actually be understood or followed.
I'm not talking here about performance issues. I'm looking for design options. I couldn't find any discussion like this out there. if anyone have a link or a suggestion, that would be fine :)
so far, I could think about the following alternatives and corresponding downsides:
I could offer multiple rooms with limited capacity. let's say 50 people per room. each user could explicitly pick a room to join, knowing its current capacity beforehand, or could be randomly put in any non-empty and non-full room.
the problem with having multiple rooms is that someone can be in one room at each time, and so, if I want to talk to the host of the party, I must get into the room he is, or no deal. so... just picking a non-full room to join may just not be good enough.
the same happens to being randomly put in a room. that may be good to keep rooms balanced, but might cause the friend I just invited to join other random room and we get separated.
other possibility would be have a single room, a thousand people inside, but just some messages would be broadcast to everybody in the room. the problem is to choose who is allowed to talk and why would anyone join a chat group to be just an expectator :P
for example, for starters, the 50 initial users to join would be allowed to talk. as long as they live, the next ones in the queue would gaining opportunity to join the conversation.
or maybe only the most active (by some ranking) would be allowed to talk.
other hybrid alternative would be to allow users to create their own rooms and (auto-)close these rooms when they get empty, and only invited people can join their rooms.
this alternative does not solve the problem of trying to talk to the host, but gives the users the responsibility to keep their rooms conversations healthy.
a last hardcore approach would be to use machine learning to put everybody in the same room and broadcast the messages to limited people (selected by the ML algorithm), possibly grouped by interest or part in the conversation.
the problem here is that recently joined users have not enough data to be put in any cohort. actually, most chat messages are just too short and too similar to have a good ML classification applied.
so....
I'm looking for any reference, suggestion, paper, idea or anything that could help this analysis.
those are objective answers. please do not close this question as not constructive. and... in case of unavoidable closing, please tell me the correct place to ask this question (and this would also be an answer to my question, since it would help my analysis by getting me to the right forum).
thanks in advance :D

search events by local at facebook

I`d like to get all events (from facebook) that will happen at a specific place.
for example:
Me, and two others people creating events in different days at a place X.
I need to get all info about the events created by me and others for that place.

Track online users in real time in order to play a two-player quiz

I am willing to create a two-player quiz game, in real time. For this I need to track when users are on my quiz's page and when they leave it. Basically, I need some kind of lobby, where players gather and from where my script picks two random players who should face each other in the game.
As many players would switch from online to offline in a very short time, I prefer not to use the classic 'update player status to database and then retrieve at a given interval the list of online players'. Currently, I am toying with the idea of using Comet Push, and have studied a little bit PubNub.
The actual quiz game I believe it is pretty easy to solve: use of classic Comet publish() to send answers and subscribe() to check the other user's status. But the thing that bothers me is how do I get that specific list with online users?
I tried to publish() a user_id when a user goes to the lobby, but how do I notify all the other users when this user goes offline? How do I display in the lobby the total number of connected users together with their names?
It's the first time I face Comet and its logic isn't entirely clear to me.
Thank you for your help!
You might want to try out Pusher and our (I work for Pusher) presence functionality. The presence channels let you easily implement room/lobby-style functionality and should meet your criteria.
You get an initial list of users subscribed to the channel when you subscribed
You are informed whenever a user subscribes (enters) and unsubscribes (leaves) the channel (room/lobby)
This way you don't need to implement this functionality yourself. It's part of the solution Pusher provides.

XMPP multiplayer gaming: should I store opponents as roster contacts?

I've read all 484 pages of Professional XMPP and read countless forum threads regarding rosters + XMPP and this question is still something I am struggling to solve. I'm looking for insight on best practices, so I at least know which direction to go in.
I'm building a cross-platform (web, iOS & Xbox), turn-based board game. Every player can have up to 100 different matches active at any given moment -- so they could easily skip from one game where it's not there turn to one where it is.
The game will feature a lobby where your list of active games are displayed, along with the name and online status of each opponent for that game (you may have up to 3 opponents, 4 total players per game).
Additionally, each player will have a friends list accessible from a different area which also lists online status.
I am using XMPP behind the scenes, completely transparent to the players, no one will ever sign in with a Jabber client or anything of the sort. I have complete control over how the information is displayed and utilized.
The main aspects I am using XMPP to solve are: notifications when an opponent has made a move, seeing my friends online statuses, and seeing my opponents online statuses, and in-game text chat.
So here's where I start having trouble: obviously your friends list will be contacts in your roster, so you can see their online status. But what about opponents? These are usually random opponents you will only play a single match with and never again -- yet your game with them may last up to 2 weeks.
Keeping in mind that everything is behind the scenes (ex: automatic subscription confirmations, etc) -- would the best course of action be to add each opponent to another group in your roster while the game is in progress and then remove them after the game is complete? That way you get presence notifications when that player is online? Or is this a case where PubSub could be utilized?
I've also considered using multi-user chat so I'd always have access to every users online status without subscriptions, but that seems far from efficient when there could be up to 20k players online at any given moment. Definitely sounds like a battery hog on mobile devices as well.
My other solution is to used share roster lists. Create a roster list for each game and assign that list to each player. Then delete the shared roster list once the game is complete.
I would choose Pubsub here. Of course, this means that you have to do some server side work too.
Send a directed presence to the opponents. This will allow them to see your presence.
I would consider using a multi-user chat for each game, and your own extension to the MUC protocol to handle game-state messages (opponent has made a move). The user can have a roster of their friends at the "global" level, but can still communicate with their opponents (and receive presence) using the MUC level (unless they decide to then add them as a friend).
See also: Advantages of Pubsub versus MUC
I agree that using MUCS (instant) would be better in this scenario. If you need to cleanup pubsub nodes of unwanted subscribers, it will definitely be a pain in the ass.