Introduction

This article will describe for developers how to integrate and use the Analytics monitor in an application on any platform. After completing the steps, your application will be submitting statistics data to your Analytics dashboard.

If you have not already created an application, please do so first. You can read more about that here:

What is the "monitor"?

Statistics for your application are handled by a platform-specific monitor. The monitor will collect, store, and submit the statistics data for your application both automatically and according to your needs.

On all platforms, the monitor-library is a real component that an application must add explicitly. Your application must also programmatically create a monitor instance and invoke its API-methods for it to do its job. There is no magic "Enable Analytics for my entire app"-switch.

The Monitor is used by your application

The monitor life-cycle

Your application will cause analytics data to be sent by explicitly creating a monitor object and invoking its API. The life-cycle of the monitor is overall the same on all platforms:

  1. Add the monitor library to your application
  2. Create the monitor instance with product key and optional settings
  3. Start the monitor when your application starts
  4. Track what is happening while your application is running
  5. Stop the monitor when your application stops

The runtime flow is illustrated below:

Monitor Lifecycle

The details of adding the monitor are very platform-specific and are therefore described individually for All Platforms. Still, the monitor behaves in the same overall manner on all platforms, which will be elaborated below.

Create

A created monitor object is your ticket to reporting data to the analytics server.

Your application will typically create one monitor object, but it is perfectly fine to create multiple instances if you have that need. The monitor will automatically gather information about the platform it is running on (operating system, screen resolution, language, etc) so you don't need to worry about that.

Start and Stop

Once created you should ideally call Start when your application starts and and Stop when it is about to stop.

Upon calling Stop the analytics server will register that your application has now been used this one time (also called a session) and receive all the gathered statistics from the monitor.

It is perfectly fine to call Start and Stop repeatedly on the monitor object. Each such Start and Stop will be recognized as one run (session) of your application. Stopping and starting the monitor repeatedly is a common practice when dealing with apps that can be suspended and resumed.

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.