diff --git a/docs/ecolyo/functionalities/usage_events_tracking.md b/docs/ecolyo/functionalities/usage_events_tracking.md index dd28afbc0664d4d33f605cb2d9d622c341b2fe84..2704c2e78c5b5a733f87676b849aa026acd02894 100644 --- a/docs/ecolyo/functionalities/usage_events_tracking.md +++ b/docs/ecolyo/functionalities/usage_events_tracking.md @@ -28,16 +28,18 @@ During the use of the application we stored some events link to an user action. | Consumption | ConsumptionChangeTimeStepEvent | TimeStep | | Fluid | User changes timeStep of its consumption. | | Consumption | ConsumptionInteracteEvent | | | Fluid / TimeStep | User selects a consumption on the chart. | -All events are stored with the *aggregated* flag to false to allow the identification of new events. +All events are stored with the _aggregated_ flag to false to allow the identification of new events. ## Usage events aggregator service ## Functionnalities -The service will retrieve all new events by filter on the *aggregated* flag to **false** and the event date before than today. +The service will retrieve all new events by filter on the _aggregated_ flag to **false** and the event date before than today. For each aggregator type we will defined the right calculation to apply to create the appropriate indicator: - calculation of the session time indicator based on ConnectionEvent +- calculation of the konnectors connected per day based on the fluidStatus +- calculates if a user launched a duel just after earned 15 stars - calculation of the period between 2 different challenges based on the ChallengeLaunchEvent - calculation of the period between the first connection and the first challenge based on ChallengeLaunchEvent and ConnectionEvent - calculation of an indicator based on a single event @@ -48,7 +50,7 @@ Once the indicators is calculated we will: 1. post the indicator to the remote doctype 2. push the event used to calculate the indicator to a array, which will be used to identify all events taken into account during the process. -At the end of the service, the service will change the *aggregated* flag to **true** for all events present in the array. +At the end of the service, the service will change the _aggregated_ flag to **true** for all events present in the array. More technical information are available [here](/ecolyo/services/aggregator_usage_events.md) @@ -56,6 +58,7 @@ More technical information are available [here](/ecolyo/services/aggregator_usag All indicator are post to a remote doctype, which will allow the application to read a defined external API. This doctype is created by Cozy itself. Here are the actual structure of this remote doctype: + ``` { source: string @@ -66,6 +69,7 @@ Here are the actual structure of this remote doctype: groups: { [key: string]: string } } ``` + with: - source: contains "ecolyo" value. @@ -73,4 +77,3 @@ with: - startDate and endDate: used to defined a period or if not relevant, it contains both the date of the events. - value: contains aggreated value (example: number of page viewed on a day). - groups: contains all other attribute useful for the indicator (example: context, target, result) -