Events

Follow
Availability

The Events feature is available in Countly Lite and Countly Enterprise.

The Events feature enables you to send any information and type of data from the SDK to the Countly server. With Events, you can track every interaction that a user has with your application, including clicks, scroll-throughs, purchases, and more. By attaching properties such as sum (value of an item or Event) and count (number of times the Event occurs), you can track buyer interaction with your application easily, and even drill further into this data for actionable insights using other features in Countly.

Benefits of Events

Events is one of the key features of Countly, and central to tracking user and product data. By identifying and setting up the Events that matter the most to your different teams, you can track specific actions of each user, analyze user behaviors by using this data in the Drill feature, as well as apply this data in other Countly features to better understand your customers' journeys and preferences. You can follow user journeys, build flows and funnels, segment users into cohorts on the basis of their actions, properties, or behaviors, monitor product performance, run A/B tests, and track revenue among other activities. Using Events, you can identify every point of interaction between your user and application, and apply this information to boost engagement, retention, and loyalty.

Getting Started

Defining Events

Event(s) data will only be sent by the SDK to the Countly server once you have set up clear, identifiable Event(s).

To get started with the Events feature, you need to first define the metrics that you want to track in your application. This can include anything from User Clicking Signup Button to User Making Payment, and from User Clicking Transfer Button to User Clicking Feedback Submission Button. Start with a small list of Events and add to this as you go along. If you are just getting started with defining Events in your application, make sure to check out the Getting started with SDKs article.

Next, you need to set these Event(s) details up in the SDK.

Generating Personalized SDK Code Snippets

Each SDK has a different, custom code snippet for an Event. You can use the Countly Code Generator to generate custom SDK code snippets easily and fast. You can provide values for your Event or User Profile, or simply start with basic integration, and this service will generate the necessary code for you to use in your favorite IDE (e.g., XCode or Android Studio).

To understand how to implement Events for each SDK, please refer to each SDK's documentation.

Pre-set Events

While you are required to identify and set up Events that are crucial to your application, Countly has some pre-set Events, known as Internal Events. You can find more information on these here.

Industry-specific Events

Most applications will share basic Events, but to help you get started and further elucidate how you can define Events, we have listed a few industry-specific Events for your reference. Click through the below links to go through these Events and discover what insights they provide:

Now that you have explored how to set up Events, let's delve deeper into them and discover how to customize them for your application. This includes setting up their properties to track the information your teams want, as well as exploring how to use the Events Views in Countly.

Creating Events within Countly

You can create Events directly from Countly using Data Manager. However, SDK implementation requirements will still be valid.

Note that the Data Manager feature is available only in Countly Enterprise.

Events Overview

Elements and Basic Structure

An Event includes the below elements:

  • Event Key
  • Event Properties (Count, Sum, and Duration)
  • Event Segmentation

The basic structure of an Event (using placeholder values for each element) is as follows:

{
   "key": "Event Key",
   "count": Number,
   "sum": Number,
   "dur": Time,
   "segmentation": {
      "Item": "Details of Item",
      "Sub Category": "Details of Sub Category",
      "Main Category": "Details of Main Category"
   }
}

Let's explore these elements in more detail.

Event Keys

Your Events are identified or readable by their Event Keys. Simply put, a Key is the identifier/name of the Event. Always provide clear names to your Event Keys, such as signupButtonClick or signup-process-success. You can always define a 'Display Name', i.e., the term you see for the Event in Countly in the Events View later on, and this would be applicable through the reporting interface. E.g., show 'Successful signup' as a Display Name for the Event Key 'signup-process-success'.

It is recommended that your Event Key value is under 30 characters to enable easier reading.

Event Properties

For every Event that you track, you will also want to track details such as how many times it happened or how long the process took. To give you actionable insights, Countly attaches three properties to each Event:

  • count - the number of times an Event occurred;
  • sum - the value that keeps track of numerical data related to an Event (e.g., price of an item); and
  • dur - the duration of how long an Event took, recorded in seconds. Adding this property is optional.

Note: Countly SDKs also have a concept called timed events to mark the beginning and end of an Event to calculate the duration automatically.

Event Segmentation

Sometimes, in addition to the Event Properties mentioned above, you may want to track additional details. This is where Event Segmentation comes in. Segmentation makes it possible to categorize or label an Event in order to obtain more information about it. By simply adding Segmentation Key-value Pairs to an Event, you can track detailed metrics, and an Event Key can have various Segmentation Key-values.

Example

Let's apply all the above information to an example. Let's suppose that you wish to track the number of times someone purchases a laptop - which is stocked under the Electronics category and Computers sub-category of your application - valued at 1000, and they make the purchase within 3600 seconds (i.e., 60 minutes, assuming that a user will take this long to explore options and make a selection). This information can be filled into the Basic Structure shown above to provide the following Event details:

{
   "key": "Purchase",
   "count": 1,
   "sum": 1000,
"dur": 3600, "segmentation": { "Item": "Laptop X", "Sub Category": "Computers", "Main Category": "Electronics" } }

Using Events

The Events feature comprises of three Views:

  1. Overview
  2. All Events, which is split into:
    1. Event Stats
    2. Compare Events

To start, use the dropdown next to Events in the Main Menu, and go to Overview (for a complete overview of all Events), or to All Events. When you click on All Events, you will automatically land on the Event Stats View. You can click on Compare Events at the top of the page to move to that View.

Read on to know more about each section.

Combining Events with Data Manager

To manage all your Events, including their categories, and to look into Event Grouping, you can use Data Manager.

Note that the Data Manager feature is available only in the Enterprise Edition.

Overview

Overview is the main View of the Events feature. To go to Overview, you need to go to Main Menu > Events (Dropdown) > Overview. This page provides a complete summary of all the Events you are tracking within your application. Since Countly 21.09, the data for most of the metrics within this View cover a default period of 30 days.

eventsov-main.png

This View provides the below details:

  1. Total Event Count: This is the total number of times all Events have been triggered.
  2. Events per User: This is the average number of Events triggered per User, calculated as Total Event Count / Number of Users.
  3. Events per Session: This is the average number of Events triggered per Session, calculated as Total Event Count / Number of Sessions.
  4. Top Events in the Last 30 Days: This section highlights the Top 3 Events by Count, in the past 30 days.
  5. Event Metrics: This delves into the details of the listed Events. You can use the arrows on the bottom right of the table to scroll through the entire list of Events set up.
  6. The search bar on the top right corner of the table allows you to search for specific Events.
  7. Use the Download button on the left of the search bar to download a report of the Event Metrics.eventsov-main2.png
  8. Monitor Events: This section gives you a snapshot of the Events most important to you. You can set the time period for which you want to see Event data in the Time Period box on the top left corner of the section.
  9. To select which Events you want to include in this widget, click on the Configure Events button in the top right corner.

Configuring Events

eventsov-conf1.png

When you click on Configure Events, a drawer will open up. You can select up to 12 Events to showcase. Simply select the Event and the relevant Property, then click on Add to List. Once you have selected all the Events you want to monitor, click on Done at the bottom right of the drawer. With this, you can easily follow the Events most important to your goals.

All Events

All Events allows you to delve further into your Event data with two Tabs and their relevant Views: Event Stats and Compare Events. When you click the dropdown arrow next to Events in the Main Menu, and select All Events, you will land on the Event Stats View by default. To move between Event Stats and Compare Events, use the two Tabs at the top of the page.

events-sidebar.png

Event Stats

Events Stats.png

The Event Stats View offers a detailed look into any selected Event. 

  1. On the left side of the page, you will see the entire list of Events set up. Click on any Event to see its details.
  2. To further delve into this information, segregate the data for your selected Event by selecting the desired Segmentation from the Segmentation dropdown.
  3. The desired time period can be selected from the Period dropdown. The data within the graph and table will reflect Event data filtered by the selected Segmentation and for the selected time period.

The data, for any selected Event, will include the following:

  • Count: Number of times the event has occurred, in the selected time period.
  • Sum: The value highlighting the numerical data related to this event.
  • Duration: The average duration for the Event to have taken place.

4. Data Chart

The Data Chart highlights the Count, Sum, and Duration trends of the Event selected (with selected segmentation, if any) for the selected time period. The Chart can be viewed in either a line or bar format, which can be selected from the chart type dropdown menu.

5. By hovering on any date on the graph, you can see the value for that particular date.

6. All three parameters can be hidden from view by selecting/unselecting their corresponding boxes.

7. Changes in the Count, Sum, and Duration from the previous period are also expressed as a percentage next to the whole values at the bottom of the Data Chart.

8. Data Table

The Data Table provides a tabular outlook to the selected Event data, for the selected time period, segregated by Segmentation. You can see the Count, Sum, and Dur of the Event data for each segment.

9. There is a three-dot ellipsis menu at the top right corner of the screen, which will lead you to the Drill section. Upon going to drill section, it will prefill your selected event, period, and the breakdown value, which will basically be the segmentation that you created in the event section. Now, you can add segmentation and execute the query.  

Compare Events

Compare Events-1.png

You can use Compare Events to delve into two or more specific Events and see their trends in comparison to one another.

  1. Click on the Compare Events Tab at the top of the page in All Events
  2. You can start by either selecting the desired Event from the dropdown menu, or also begin typing the Event name until the relevant options come up before making a selection. Select all the Events you want to compare, up to a maximum of 20 Events at a time, and click on Compare. This will populate the chart and table with the comparison of the selected Events. The chart will automatically show you results through a Line Graph. 
  3. You can use the dropdown on the left of the chart to change this to a Bar Graph.
  4. To further fine-tune your comparison, select a time period using the dropdown. You will now see all data filtered for the selected time period.
  5. You can select to filter the results by the property of your choice - Sum, Count, or Duration. However, remember that not all events have all three properties. Once you have made your selection, you will see the selected Events' data for the selected property and the selected time period compared in a chart.
  6. By hovering on any date on the graph, you can see the values for each Event.
  7. You can use the three-dot ellipsis button to zoom in or download the chart as an image in PNG format.
  8. You can select/deselect the visualization of a particular event by clicking on the Event name or the checkbox.

Compare Events 2.png

9. A table under the chart highlights the Event name, along with the Count, Sum, Duration, and Avg. Duration of each for a tabular comparison.This report can be downloaded by clicking the Download button to the left of the search bar of the table.

Troubleshooting and FAQ

Can I send Events data without a session?

In cases where you would like to send data via the API, you can send Events without beginning a session. There is no problem in sending event data out of a session (e.g., without first sending the session initialization information). Events are stored correctly, without mapping to a session.

Additional Resources

  • Countly Drill: Get even more out of your Events data with the Drill feature - a highly advanced query tool for your Events.
  • Countly Funnels: Use Events to set up and track paths and goal completions inside your app to better understand your users' journeys.

 

Looking for help?