What is event in context of Netflix technology? - netflix

In this link, #4.49sec speaker talks about some stats. He mentions 'event'.
What exactly event here means in programming terms?

An event in this case basically means a message with some data in it. Later in the video he mentions examples like session data, tracing data etc.
You can put e.g. a user id in it, and an action that the user did, when the event was created. Consumers can then create statistics and react on those events (you could for example create a new movie recommendation, when the user finished watching a movie, and you have ingested that event).

Related

Google calendar api v3: update all future events in recurring series limited by count

My question: how do I update "this and all future" instances in a recurring event which is limited by count so that the total number of events stays consistent?
What is the problem:
Trying to modify recurring event and I follow the below guide:
https://developers.google.com/calendar/recurringevents
Basically to update all future recurring events using a target event, the doc says one need to do two calls:
update existing event to make so it ends before the target event date
create a new recurring event with the same fields except of those need changes.
That works fine until there is an event that is limited by the number of occurrences.
Let's say there is a recurring event limited by 10 occurrences and target event is 5th event.
Now I need to split the original so that the first 4 events goes to the original one (so I update COUNT from 10 to 4) and then I create a new recurring event that holds the rest 6 events (so COUNT is 6 in this case)
My first observation is that this is not how the split events are displayed in google calendar - if I test that manually, the both events still show 10 occurrences but the second one doesn't produce any extra events (I'd expect 14 events from developer perspective, yet there are 10 as any user would expect). That implies there is a different approach here? Is it?
Also if I end up counting manually the number of events, there are still issues with cases like deleting one of the events first (let's say, the 4th event) - now how do I know that I need to show 6 instances in the new one and not 7?
Those thoughts make me think there is a better approach, but I can't find any other alternatives. Any advice on that?
UPDATE
It seems like google does it differently: for example after changing a title for "this and future" events in calendar view, it doesn't seem to produce two different recurring events since if you try to delete "all" events, that will remove all of them completely (rather than deleting only one chunk, either before or after the target event)
It seems like they are creating a bunch of exceptions or maybe "recurring exception" or something to do that. Can't find any examples on how to do that as of now thought.
Can't find any good solution for this after a few days of research and while I need to move forward I ended up with a sort of "compromise" between "good enough UX for my case" and "breaking best practice".
So I ended up updating each event individually which goes against google's warning as shown below but I limited the max count by 50. This is not necessary what others want to do, but this is good enough for the real world use case in my app.
Warning: Do not modify instances individually when you want to modify
the entire recurring event, or "this and following" instances. This
creates lots of exceptions that clutter the calendar, slowing down
access and sending a high number of change notifications to users.
And if user needs to schedule more than that, the user is asked to use "end date" instead.
Again, not ideal by any means so if anyone knows how to handle that correctly or knows how google handles that, you are very welcome to share it! (meh... and I need that for outlook too now...)
UPDATE: just got an idea: as an improvement, one can edit either "all future events" or alternatively the master event + "all previous events" depending on the index of the target event. In this case one can limit the number of requests by 2 (so in case of 50 events I'll need to do 25 requests maximum)
So if user wants to change the title from "Hello" to "Goodby" and if the user picked event number 5 in the series of 50 events to change all future events, we can change the master event to "Goodby" which will change the title of all events, and then update the first 4 events to the original "Hello".
Obligatory summary of comments and chat:
Updating events:
To update specific events in a recurring event you need to update the individual instance by specifying the event instance ID.
This is just the event ID concatenated with a datetime stamp (you can see this when making an Events: instances request for your eventID; if your event ID is xxxxxxxxxxxx then an instance ID would be something like xxxxxxxxxxxx__20200603T170000Z).
Unfortunately there's no direct update-instances endpoint so to update multiple instances in one request you'd need to use batching
The API doesn't have a dedicated method for updating recurring events regardless of the recurrence type, and I presume this is the reason the documentation says to edit the previous recurring event by cutting it down and inserting a new one, as per Google's warning:
Do not modify instances individually when you want to modify the entire recurring event, or "this and following" instances. This creates lots of exceptions that clutter the calendar, slowing down access and sending a high number of change notifications to users.
Batching:
Making a batch update on event instances does keep count consistency. If you edit instances in a batch and then use the 'this and all future events' option when deleting one of the instances of the recurring event they do all get deleted as they're still a part of the recurrance. There is no new event being created in either scenario, the event instances are being changed.
If you play around with Events: instances and use Events: update to change only some instances of an event, then you can see that they all stay part of the same recurrence chain and there is no count change.
For arbitrary large counts, even if you have a recurring event with 9999999 instances, each event still has an ID which you can retrieve from Events: instances. It's stored as a single event for event use, but the IDs of the instances are the identifiers which are different.
Honestly, it's not great that you have to edit each one manually; for large counts like 9999999 it's basically infeasible because you'll have to make a batch request for each set of 100 instances you want to change, but it's the only option available via the API at the moment.
Feature Request:
You can however let Google know that this is a feature that is important for the Calendar API and that you would like to request they implement it. Google's Issue Tracker is a place for developers to report issues and make feature requests for their development services, I'd urge you to make a feature request there, the Calendar API feature request form can be found here.

Is there a way - with google scripts - to authomatically check if the note field in a recurring event is empty

We are a non profit association running a library. We use a shared calendar to program the opening hours (and the volunteers who keep the library open). We need a way to be automatically notified (by email best) if a day is with no volunteers. We use the note field for this purpose, so we need to know if for a particular day the note field is empty and in that case a mail should be sent to all the volunteers.
I'm no programmer, just trying with google scrips, but looking at the various examples I found many creating events functions, but no way to check the note field of an event. So before smashing my head I would like to know if that is possible :-)

Sending custom event data to Google Analytics

I need to track events in Google Analytics from a server through the Measurement Protocol. I can do this just fine, but my problem is that I want to send additional/custom data along with the event. Specifically, I want to send a UUID along with the event so that it is possible for me to fetch data from the Google Analytics API in the future and correlate events with rows in a relational database.
Is there any decent way to send custom data along with events? I looked at using the event value, but it must be an integer, and it is not intended for things like this. The event category, action, and label are reserved for other purposes.
I am not that proficient in Google Analytics, so the solutions off the top of my head would be:
Send an additional event containing the UUID in the event label or something like that. Seems like a bit of a hack/workaround to send two events, with one being used exclusively behind the scenes.
Perhaps using a custom dimension or metric. I am not 100% sure about the implications of this and if that's a decent approach or not.
So basically my question is: what would be the best way for me to send a UUID along with a Google Analytics event from a server, taking into consideration that I cannot use the event category, action, and label for the current event? Is there any other way in which I could link events retrieved from the Google Analytics API to rows in a database?
So let's say I trigger a "Completed Order" event to GA, and I also have orders in a MySQL database. So what I want to do, is to link an event to an order row in the database.
There are several things that you can do and it pretty much depends on what you want to do with the information you are storing. For starters, all your requests should include the uid field with the value being the user ID within your system. This way all Google Analytics data will be calculated on the same user. Note: this is an internal value used within Google Analytics and you won't be able to see it.
Second, I would create a custom dimension of the name user_id and store the user information in that. You will then be able to use this information within your reports to see what each user is doing. Note: it's against TOS to send user name, email, or any other PII (personally identifiable information) to Google Analytics. But you can send your internal user ID.
I have done both of these in the past and found it to work quite well.
More info on User-ID.

How to show an custom event in ATTRIBUTION in Firebase Analytics without ad network?

We print dynamic links as an QR code on stickers in many places. Each sticker has different campaign in it. We would like to analysis which sticker (which spot) has the best performance of registration. There's an event when user complete the sign up process, named as "register".
The event is working as expected. It's shown in EVET. And we mark it as conversion.
But we couldn't see the register event shown in ATTRIBUTION. There's only one event, first_open, which is generated by firebase-analytics itself.
Our goal is to see which source contributes the most with register event, like first_open. Do we have to use an ad network to accomplish this feature ?
Dynamic links is :
https://myappapi.app.goo.gl/?link=http://our.web.site&apn=our.app.name&st=testRegTitle&sd=testRegDescription&si=https://lh3.googleusercontent.com/some_code_here&utm_source=testRegSource&utm_medium=testRegMedium&utm_campaign=testRegCampaign

can google analytics tell me http referrer for each specific goal conversion?

I have a website that allows people to create an account (that is the conversion I wish to track).
I wish to know where a specific person is coming from. I have google analytics installed and have set up the registration page as a goal, but the reporting tells me traffic sources as an aggregated pie chart. It doesn't report down to the user account level to say that 'person with email xyz' came from 'facebook' for example.
What custom variables or mark up would I need to add to GA to report at that detailed level, if that is at all possible?
Otherwise, I will just have to record the first http_referer in a cookie and stick it in a database during the registration process.
Any advice?
Firstly I must ask you, how actionable do you think it is to look at data at that granular of a level? Finding out what % of people who registered came from facebook or some other place is actionable, because it helps you do things like determine where to focus marketing efforts. But individual users? How is this actionable to you? (hint: it's not)
However, if you are still determined to know this, you should first note that it is against Google's ToS to record personally identifiable data both directly (recording the actual value in GA) or indirectly (e.g. - recording a unique id that you can use to tie to personal info stored within your own system). If this is something you don't want to risk, I suggest moving to another analytics tool that does not have this sort of thing in their ToS (e.g. Adobe SiteCatalyst, which costs money, or perhaps you may instead prefer to choose an "in-house" approach, like Piwik)
If you are still determined to follow through with this and hope not to get caught or whatever, Google Analytics doesn't record data like what info a visitor filled out in a form (like their email address) unless you populate that data in a custom field/dimension/metric/event to be sent along with the request. Usually you would populate this on the form "thank you" page (which is usually the same page you use as your goal url or goal event if you're popping and using an event for your goal). So you would populate the email address in one of those custom variables and then have it as a dimension to break down the http referrer by.

Resources