Skip to content
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

Clarify when (and how) users take events into account #274

Open
fe51 opened this issue Aug 5, 2023 · 6 comments
Open

Clarify when (and how) users take events into account #274

fe51 opened this issue Aug 5, 2023 · 6 comments
Labels
high priority question Further information is requested type: improvement New feature or request

Comments

@fe51
Copy link
Member

fe51 commented Aug 5, 2023

Hi there ✋

Feature

Know when (by whom, and how) an alert/event was seen

Motivation

As of today, knowledge of how events are taken into account by users is limited to is_acknowledged ,(a boolean) information.

The problem is that it doesn't contain any information about when (I think, tell if I am wrong) the information was seen and moreover it means: "I have seen this alert/event" AND "I no longer wish to see it on the platform".

However, having information about when the information was considered is important if we want to be able to estimate the time saved for firefighter (compared, for example, with an alert received via an emergency call).

Solutions ?

Update in pyro-api

A solution could be to add new fields to event table;

Field Type
viewed_at datetime
viewed_by user_id
viewed_with UI_type (plateform, telegram, mail, etc)

However : The suggestion here maybe poses a problem if several users see the information (only insert if field are empty to store the earlier info) (Maybe, as admin users, no info should be sent when seeing an alert ? so update those field only if the user_id is associated to the group_id of the owner_id of the device that have sent the alert ?

  • Pro:
    • Feature easy to implement
    • Long-term storage of this information, and ease of implementation of associated dashboarding (dashboard building stats relating to our performance, requesting only the api).

It will be useful for the feedback we'll be doing on the summer experiments !

  • Cons : too speficic to be stored in the api ?

Web Analytics App

Those information could be obtained setting up a web analytics app (like matomo, similar to google analytics but respecting privacy)

This will require a benchmark of the web analytics solution we want to use. Implementing it, and I tend to think that although it's necessary to implement one in general, for this specific use case, having the information in the API makes it easier to get the stats / performance of our solution. Moreover (I do not know it we would be able to monitor with ease those info if it cames from telegram or mail)

What do you think ?
Happy to discuss it ! 😄
This is a fairly important feature if we want to be able to get feedback from our experiments this summer !

Of course, there will be further developments to come on the platform side. We'll open dedicated issues once the back-end is clear :)

@fe51 fe51 added type: improvement New feature or request question Further information is requested high priority labels Aug 5, 2023
@fe51
Copy link
Member Author

fe51 commented Aug 5, 2023

@GHCamille
Copy link

Hello,

I agree that it would be an information of great value. But I have a question : by "viewed", do you mean "acknowledged" ? Because both can be handy (know when someone view an alert, and the delta before they acknowledge it, or in the future, is it the same person whom views the alert than the person who acknowledge it ...)

@blenzi
Copy link
Contributor

blenzi commented Aug 7, 2023

Hello!

I also agree it is very useful to have it and to distinguish "acknowledged" by/at and "viewed" by/at. The former is related to who is responsible for "I no longer wish to see it on the platform". I would add those fields to the event table.

The latter is more a measurement of audience, if I understand well. Therefore there can be multiple users per alert and it needs another table.

blenzi pushed a commit that referenced this issue Aug 7, 2023
…274)

- add acknowledged_ts and acknowledged_by to events table
- Dockerfile-dev: update FROM image
@frgfm
Copy link
Member

frgfm commented Oct 8, 2023

Hey there 👋

Similarly to the others, I think there is a distinction between a passive "viewed by XYZ" and "acknowledged by XYZ". The second involves the person / make that person responsible to act on the information/communicate it.

Also, while "is_acknowledged" is a flag. The viewed by / acknowledged by or their timestamps are event payloads. For the sake of the maintenablity of the core API, I think we always need to assess whether we are talking about state information or events.

In truth, we've added the "alerts" as intermediate signals to update the state of "events". Either way, about what should be on the backend vs frontend:

  • I think it's a dangerous direction to add a viewed by/at.
  • acknowledged by will only be useful if anyone who has access to this is a registered user (only Ardèche can acknowledge the alerts /events of their cameras either way). So on the firefighters side, what was the exact feedback?

Regarding analytics, I would suggest PostHog, I've used it and it's very useful / easy to add!

@blenzi
Copy link
Contributor

blenzi commented Oct 8, 2023 via email

@GHCamille
Copy link

GHCamille commented Oct 9, 2023

Backing up what Bruno is saying.

I would add that it could be useful to have the stats of how long it takes between viewing the alert and acknowledging it. For instance we could see if there is a huge impact when changing things on the platform, such as adding the bounding box, making a gif ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority question Further information is requested type: improvement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants