Composed events

Some pieces of information are only meaningful after you do certain calculations on them.

Examples of composed events are tracking the length of a user session and how long it took a user to complete a specific task. The client portion of the application must record an initial value, such as the current date, wait for the user to complete the task of interest, and then record the amount of time that passed between the initial value and the final value. The client then sends the result of that computation to the server.

The key difference between composed events and single events is that you cannot log sessionStartTime and sessionEndTime as they occur and have the server calculate the time that is spent between the two intervals to generate a meaningful chart.

In addition to time-based information, another use case for composed events is recording the source and destination page of a user's navigation through the application.

You can also record information about the user and augment analytics events that are sent to the server. For example, recording the users that used the application more than a certain number of times are considered active users. You can send information about the session, such as what country the user is in, and then filter by active users.