Daily Events Evaluation in Waaila

User actions on your website are measured as events. You can verify that no event is disappearing or plunging using Waaila new Daily Events Evaluation template. The template contains built-in configuration to tailor the tests to your experience.

Published: Aug 3rd 2022 | 4 min read

You can verify that no event is disappearing or plunging using Waaila new Daily Events Evaluation template. The template contains built-in configuration to tailor the tests to your experience.
Get the template

In Google Analytics the events are specified by event category, event action and event label. Different combinations have different importance and frequency in the data. There are events that are vital to your data measurement and events that appear only rarely. This template allows you to configure your events in the tests and check if any necessary event is missing, if no unexpected event appears and if the main events do not display any anomalous decreases.

The template contains four tests each designed to check a specific depth of event information detail. The first test checks data on the highest level of event category. The second and third focus on event category and event action combinations with the difference that the third test allows you to filter only on a specific category to reduce the volume of data displayed. You can choose between the second and the third test based on the amount of category - event combinations in your data. If you have many event actions for several categories, it may be better to use the third test, duplicate it and configure it for each category separately. The last test evaluates data at the most detailed level, the combination of event category, action and label, with a filter on the category. It is expected that there are many event labels and therefore you need to duplicate the test for all selected categories that you want to check.

Configuration and interpretation

All tests in this template contain built-in configuration, so you only need to run the test and the test will guide you through the set-up. There are two main configuration parameters, requiredEventCombinations and allowedEventCombinations. The difference between these two arrays is that combinations in requiredEventCombinations are required by the test to appear in the data every day, while combinations in allowedEventCombinations may appear but do not need to. During the configuration the test writes out a definition of both parameters using all possible values from last 28 days. You then have to:

  1. copy the definitions into the code
  2. select those that need to appear daily and delete the rest from the parameter requiredEventCombinations,
  3. if you know a combination that has not appeared in the data in last 28 days but can appear, add it to parameter allowedEventCombinations

The example below states that the data can contain only event categories 'products', 'users' and 'specialAction'. If some other event category appears, the test fails with failure message "There are some unexpected event categories in the data yesterday". To avoid alerts caused by a few testing or rare events, there is parameter maxCountUnexpected which sets the maximum allowed number of events for a combination not specified in allowedEventCombinations.

Additionally, the event categories 'products' and 'users' have to appear every day. If there is no event category 'products' or no event category 'users' in the data, the test also fails with message "There are some required event categories missing in the data yesterday".

const requiredEventCombinations = [{'eventCategory': 'products'}, {'eventCategory': 'users'}];
const allowedEventCombinations = [{'eventCategory': 'products'}, {'eventCategory': 'users'}, {'eventCategory': "specialAction"}]

Lastly, the test checks for anomalous decreases in all combinations required to appear daily (in the example 'products' and 'users'). It compares daily average from past 28 days to the number of events yesterday for given event combination. If the share of the events yesterday to the daily average is far below 1 (if the events yesterday are much lower than the daily average), the test fails and displays table with the shares and actual amouns of events for all checked event combinations. To configure the strictness of the test, you can adjust the parameter minShareToDailyAverage specifying minimum allowed share of events yesterday compared to daily average. For example for minShareToDailyAverage = 0.4, test fails if any combination has less events than 40 % of its daily average.

In the table below there are sample results for the configuration listed above. There is a decrease for both event categories - the events yesterday in column 'totalEvents' are lower than the daily average (column 'dailyAverage28d') and their share in column 'eventsShare' is below 1. However, the decrease in category 'users' is significant and below the configured allowed minimum (40 %) while the decrease in category 'products' is quite small.

anomalies