Developer Zone

Event Usage Reports for Lost Installations

Event tracking for lost users/installations is available for events that are enabled under advanced tracking. These reports are meant to show which events were most used by the users who eventually got lost. Unlike other event tracking reports, these reports show the events that were recorded during the whole user lifetime, and not limited by a specific date range.

Data Table Report

This report provides a table of events and how much they were used by users who got lost. The request and reponse are both JSON objects.

Request/response parameters summary

POST /reporting/eventTracking/churn/dataTable

The following is a summary of the properties inside the request and response objects.

Request JSON Object:
 
  • user (string) – The username of your Usage Intelligence user account. Required only for non-cookie authentication.
  • sessionId (string) – The sessionId obtained via POST /auth/login. Required only for non-cookie authentication.
  • productId (integer) – The product ID on which this request is being done
  • startDate (string) – The first date of the date range on which to base the report. This is to be formatted as YYYY-MM-DD.
  • stopDate (string) – The last date of the date range on which to base the report. This is to be formatted as YYYY-MM-DD.
  • daysUntilDeclaredLost (integer) – This specifies the number of consecutive days of inactivity that have to pass until a client installation is declared lost.
  • dateReportedLost (string) – When an installation is lost, it can either be shown as lost on the date it last contacted the Revulytics servers (dateLastSeen) or else it can be shown as lost when it was declared lost (last date when it contacted Revulytics + the number of days specified in daysUntilDeclaredLost) (dateDeclaredLost). Therefore, the permitted values are dateLastSeen and dateDeclaredLost.
  • globalFilters (object) – JSON object containing the filters to be applied to the available data. Details about these filters can be found in the Global Filters section.
  • segmentBy (string) – Optional parameter to indicate the field with which to segment the data. Details about segmentation can be found in the Data Segmentation section.
  • segments (object) – Optional JSON object that describes how data is to be split into segments. Refer to the Data Segmentation section.
  • sort (string) – Optional property to specify how the segments are to be sorted. Possible values are alpha or eventCounts. If this property is not included, the data is sorted alphabetically by default.
  • sortDirection (string) – Optional property to specify whether to sort in ascending or descending order. Possible values are asc and desc. If not specified, data is sorted in ascending order by default.
Response JSON Object:
 
  • status (string) – Contains OK if successful or SYNTAX ERROR or AUTH ERROR
  • reason (string) – Present only if status is not OK. Contains error message (reason)
  • results (object) – Contains the results as requested represented as a JSON object. The result format is described below.

Data Segmentation

Optionally, data may be segmented by 1 level. When using segmentation, events data is split based on the segment property requested. In order to select a segmentation property, specify any metadata property in the segmentBy field. The way segments are to be generated must be specified in the segments field. The segments field should contain a JSON object with the following properties:

  • type (string) - The data type of the value. Can be string, stringArray, regex, number or numberRange based on whether the property is string-based or numeric.
  • value (string/array/number) - An exact string, an array of strings, a regular expression or a numeric value. This property should not be used if type is numberRange. Format is based on whether the property is string-based or numeric.
  • min (number) - Used only if the type is numberRange. Contains the minimum numeric value to include in this segment. May be combined with max.
  • max (number) - Used only if the type is numberRange. Contains the maximum numeric value to include in this segment. May be combined with min.
  • split (boolean) - Used only if the type is stringArray or regex. This specifies whether to split the returned data based on each different value matched by the regular expression or array (true), or to join all the clients that match the value as 1 table value or series (false).
  • segmentLabel (string) - Used only if split is false or if type is numberRange. This is required to give a name to a series when not splitting by value. It is important that the name given is unique.
  • limit (integer) - Optional property to set the limit on the maximum number of table values or serieses that should be produced by this set of values. To be used only if split is true.

Special segmentation format: licenseStatus

The licenseStatus value is made up of 4 sub-values: activated, blacklisted, expired and whitelisted. These are presented as boolean values. Any number of segments can be defined, and each segment can contain any subset of the 4 sub-values. These values are ANDed together. A segmentLabel value is required.

In the following example, 2 table values/series are produced - the first one showing blacklisted AND not expired and the second one showing whitelisted AND activated:

[
    {
        "segmentLabel": "BL and not EXP",
        "blacklisted": true,
        "expired": false
    },
    {
        "segmentLabel": "WL and ACT",
        "whitelisted": true,
        "expired": true
    }
]

Special segmentation format: os

The os value is made up of 3 granularity levels - platform, version, and edition. A particular level needs to be selected, and this is to be included in the segmentBy property name such as os.version or os.edition. For a description of the differences between the 3 granularity levels, refer to the os special filter section.

The following example shows the levels object requesting 3 granularity levels as described above:

{
    "level1": {
        "property": "os.platform",
        "segments": [
            {
                "type": "regex",
                "value": ".*",
                "split": true
            }
        ]
    },
    "level2": {
        "property": "os.version",
        "segments": [
            {
                "type": "regex",
                "value": ".*",
                "split": true
            }
        ]
    },
    "level3": {
        "property": "os.edition",
        "segments": [
            {
                "type": "regex",
                "value": ".*",
                "split": true
            }
        ]
    }
}

In the above example, no filtering is being done, and instead, a regular expression to include everything is set as the value. This will result in the top OS platforms, versions, and editions to be included in the hierarchy.

Special segmentation format: geography

The geography value is made up of 3 granularity levels - continent, country, and usState. These granularity levels are explained in the geography special filter section. A particular level needs to be selected, and this is to be included in the segmentBy property name such as geography.continent or geography.country.

The following example shows the levels object requesting 3 granularity levels as described above:

{
    "level1": {
        "property": "geography.continent",
        "segments": [
            {
                "type": "regex",
                "value": ".*",
                "split": true
            }
        ]
    },
    "level2": {
        "property": "geography.country",
        "segments": [
            {
                "type": "regex",
                "value": ".*",
                "split": true
            }
        ]
    },
    "level3": {
        "property": "geography.usState",
        "segments": [
            {
                "type": "regex",
                "value": ".*",
                "split": true
            }
        ]
    }
}

In the above example, no filtering is being done, and instead, a regular expression to include everything is set as the value. This will result in all the continents, and the top countries and US states (where applicable) to be included in the hierarchy.

Request example

In the following example, data is being segmented by prodVersion. Instead of specifying a list of segments, the top 2 segments based on the total number of events are being requested. This is done by limiting the number of split segments to 2, and sorting by eventCounts in descending order.

POST /reporting/eventTracking/churn/dataTable  HTTP/1.1
Host: api.revulytics.com
Content-Type: application/json
Accept: application/json

{
    "user": "testuser@test.com",
    "sessionId": "VSB8E2BzSC2eZSJm4QmTpA",
    "productId": 12345678901,
    "startDate": "2014-08-01",
    "stopDate": "2014-08-03",
    "daysUntilDeclaredLost": 30,
    "dateReportedLost": "dateDeclaredLost",
    "globalFilters": {},
    "segmentBy": "prodVersion",
    "segments": [ { "limit": 2,
                    "split": True,
                    "type": 'regex',
                    "value": ".*"}],
    "sort": "eventCounts",
    "sortDirection": "desc"
}

Results format

If segmentation is used, the results are formatted in a JSON object which contains an element for each segment. Each of these elements contains an array. If segmentation is not being used, the JSON object is skipped and the results are formatted as a single array in the same format as one of the inner arrays in the JSON object returned when using segmentation. This array contains a number of JSON objects - one for each event. These objects contain the category and name of the event, and usage information such as number of times it occurred (eventCount), average number of times it occurred by each user who used it at least once (eventCountPerUser), and the percentage of users who used this event at least once compared with those who never used it.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "status": "OK",
    "segmentBy": "prodVersion",
    "results": {
                  "1": [{
                              "eventCategory": "Startup",
                              "eventName": "Launch Wizard",
                              "eventCount": 6203,
                              "eventCountPerUser": 775.0,
                              "usersUsedAtLeastOnce": 8,
                              "percentUsedAtLeastOnce": 27.59,
                              "usersNeverUsed": 21,
                              "percentNeverUsed": 72.41
                        }, {
                              "eventCategory": "File Operations",
                              "eventName": "Open",
                              "eventCount": 8778,
                              "eventCountPerUser": 302.0,
                              "usersUsedAtLeastOnce": 29,
                              "percentUsedAtLeastOnce": 100.0,
                              "usersNeverUsed": 0,
                              "percentNeverUsed": 0.0
                        }, {
                              "eventCategory": "File Operations",
                              "eventName": "Save",
                              "eventCount": 2099,
                              "eventCountPerUser": 72.0,
                              "usersUsedAtLeastOnce": 29,
                              "percentUsedAtLeastOnce": 100.0,
                              "usersNeverUsed": 0,
                              "percentNeverUsed": 0.0
                        }],
                  "1.5": [{
                              "eventCategory": "Startup",
                              "eventName": "Launch Wizard",
                              "eventCount": 36006,
                              "eventCountPerUser": 433.0,
                              "usersUsedAtLeastOnce": 83,
                              "percentUsedAtLeastOnce": 27.67,
                              "usersNeverUsed": 217,
                              "percentNeverUsed": 72.33
                          }, {
                              "eventCategory": "File Operations",
                              "eventName": "Open",
                              "eventCount": 53322,
                              "eventCountPerUser": 177.0,
                              "usersUsedAtLeastOnce": 300,
                              "percentUsedAtLeastOnce": 100.0,
                              "usersNeverUsed": 0,
                              "percentNeverUsed": 0.0
                          }, {
                              "eventCategory": "File Operations",
                              "eventName": "Save",
                              "eventCount": 16180,
                              "eventCountPerUser": 53.0,
                              "usersUsedAtLeastOnce": 300,
                              "percentUsedAtLeastOnce": 100.0,
                              "usersNeverUsed": 0,
                              "percentNeverUsed": 0.0
                          }]
               }
}

Histogram Report

This report provides a histogram based on a single event or a combination of events. The histogram shows the number of times a particular event or combination of events were used by the users who got lost.

Request/response parameters summary

POST /reporting/eventTracking/churn/histogram
Request JSON Object:
 
  • user (string) – The username of your Usage Intelligence user account. Required only for non-cookie authentication.
  • sessionId (string) – The sessionId obtained via POST /auth/login. Required only for non-cookie authentication.
  • productId (integer) – The product ID on which this request is being done
  • startDate (string) – The first date of the date range on which to base the report. This is to be formatted as YYYY-MM-DD.
  • stopDate (string) – The last date of the date range on which to base the report. This is to be formatted as YYYY-MM-DD.
  • daysUntilDeclaredLost (integer) – This specifies the number of consecutive days of inactivity that have to pass until a client installation is declared lost.
  • dateReportedLost (string) – When an installation is lost, it can either be shown as lost on the date it last contacted the Revulytics servers (dateLastSeen) or else it can be shown as lost when it was declared lost (last date when it contacted Revulytics + the number of days specified in daysUntilDeclaredLost) (dateDeclaredLost). Therefore, the permitted values are dateLastSeen and dateDeclaredLost.
  • globalFilters (object) – JSON object containing the filters to be applied to the available data. Details about these filters can be found in the Global Filters section.
  • event (object) – JSON object specifying which event or combination of events to base the report on. Please refer to the event Property section.
Response JSON Object:
 
  • status (string) – Contains OK if successful or SYNTAX ERROR or AUTH ERROR
  • reason (string) – Present only if status is not OK. Contains error message (reason)
  • results (object) – Contains the results as requested represented as a JSON object. The result format is described below.

event Property

In this property, one must specify either a single event or a combination of events.

To specify a single event, this property should look like the following example:

{
     "category": "File Operations",
     "name":"Open"
}

To specify a combination of events, the event property should look like the following:

{
     "combiArray":  [
                       {
                         "categoryType": "string",
                         "nameType": "string",
                         "category": "File Operations",
                         "name": "Open"
                       },
                       {
                         "categoryType": "string",
                         "nameType": "string",
                         "category": "File Operations",
                         "name": "Save",
                       }
                    ]
}

In the above example, we are combining the data from the Open and Save events, both under the File Operations category. In this example, “string” is being used both as categoryType and nameType. The other possible value is “regex”. The following example shows a case where all events under the File Operations category are being combined:

{
     "combiArray":  [
                       {
                         "categoryType": "string",
                         "nameType": "regex",
                         "category": "File Operations",
                         "name": ".*"
                       }
                    ]
}

Results format

The results are formatted in a JSON object which contains an element for each histogram bin. Each of these elements contains a numeric value which represents the number of installations which fall under this bin.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "status": "OK",
  "results": {
          "1 - 10": 87,
          "11 - 15": 57,
          "16 - 20": 57,
          "21 - 25": 61,
          "26 - 30": 51,
          "31 - 35": 51,
          "36 - 40": 39,
          "41 - 45": 46,
          "46 - 50": 33,
          "51 - 60": 78,
          "61 - 70": 60,
          "71 - 80": 53,
          "81 - 90": 45,
          "91 - 100": 39,
          "101 - 110": 43,
          "111 - 120": 34,
          "121 - 130": 29,
          "131 - 140": 18,
          "141 - 150": 32,
          "151 - 175": 41,
          "176 - 200": 40,
          "201 - 225": 33,
          "226 - 250": 32,
          "251 - 275": 34,
          "276 - 300": 32,
          "301 - 325": 25,
          "326 - 350": 12,
          "351 - 375": 14,
          "376 - 400": 11,
          "\u2265 401": 65
  }
}

Global Filters

These filters are common between both reports documented above. Most of the available filter properties are string-based. This means that when applying a filter, the requested field can be represented as a string, stringArray or regex. There are also some filters which are numeric. These filters should be represented as number or numberRange.

The data used for the filters in these reports is the latest-known data, or data when lost. Therefore, if a user started using version 1 and then switched to version 2 before getting lost, that user will show up if filtering for version 2 and not for version 1.

String-based filters

The following properties are stored as strings:

  • prodVersion
  • prodEdition
  • prodBuild
  • prodLanguage
  • licenseType
  • formFactor
  • osLanguage
  • osWordLength
  • cpuType
  • licenseKey **

The type field in the above filters needs to be string, stringArray or regex. A value field is always required. The contents of this field should be according to the specified type. If string is specified, then the value field must contain a single string that needs to be matched precisely with the stored data. If stringArray is specified, then the value field must contain an array of strings where one of which needs to match precisely with the stored data. If specifying a regex, the value field should contain a string which is treated as a regular expression and the stored data will be matched against it using regular expression rules.

** licenseKey requires a special user permission to filter by license key.

Example filter using a string value

In this example, the product build value needs to be exactly “3014.int-12214”:

{
      "prodBuild":
          {
              "type": "string",
              "value": "3014.int-12214"
          }
 }

Example filter using a string array

In this example, the product build value needs to be either “3014.int-12214”, “3017.enx-57718”, or “4180.vrx-81059”. Note that since the type is declared as stringArray, the value field needs to contain an array. Consider all elements in the array to have an OR logical expression between them.:

{
    "prodBuild":
        {
            "type": "stringArray",
            "value": ["3014.int-12214", "3017.enx-57718", "4180.vrx-81059"]
        }
}

Example filter using a regular expression

In this example, the product build value needs to start with “30” and end with “18” whilst having 10 characters in between:

{
     "prodBuild":
         {
             "type": "regex",
             "value": "^30.{10}18$"
         }
}

Numeric filters

The following properties are stored as numeric values:

  • cpuCores
  • displayCount
  • ram
  • resolutionWidth
  • resolutionHeight
  • lifetimeRuntimeMinutes
  • lifetimeSessionCount

The type field in the above filters needs to be number or numberRange. If number is specified, then a value field must also be present. The value field should contain a number, which may contain a decimal point if required. If numberRange is specified, then the value field should NOT be used. Instead, the properties min and max are to be used. These refer to the minimum and maximum number to be included in the report. If only one limit needs to be set, the other property is to be left out. Therefore, if you want to include installations with up to 2 display devices, you would not specify a min value, but instead specify only a max and set it as 2.

Example filter using a number value

In this example, the number of display devices needs to be exactly 3:

{
      "displayCount":
          {
              "type": "number",
              "value": 3
          }
 }

Example filter using a number value

In this example, the RAM needs to be between 1025MB and 4096MB (both included):

{
      "ram":
          {
              "type": "numberRange",
              "min": 1024,
              "max": 4096
          }
 }

Special filters

Some filters need to be represented in a special format due to their unique requirements. These special filters are:

Special filter: licenseStatus

The licenseStatus filter is made up of 4 sub-values: activated, blacklisted, expired and whitelisted. These are presented as boolean values. Unlike other filters, this filter is presented as an array of JSON objects. Each object can contain a subset (or all) of these 4 boolean values. Consider the following example. In this example, for a client to be included, the license has to either be activated AND whitelisted, or else it can be not whitelisted AND expired. In other words, ( (activated AND whitelisted) OR ((NOT)whitelisted AND expired) ).

{
    "licenseStatus":
        [
            {
                "activated": true,
                "whitelisted": true
            },
            {
                "whitelisted": false,
                "expired": true
            }
        ]
}

Special filter: os

The os filter is made up of 3 granularity levels. These are platform, version, and edition. These are meant to split the OS name into levels of detail as required by the user. Consider the following:

  • platform: Microsoft Windows
  • version: Microsoft Windows 7
  • edition: Microsoft Windows 7 Professional

If a filter is set on the version “Microsoft Windows 7”, the result would include all editions of Windows 7. One or more of these granularity levels may be specified. If more than 1 granularity level is specified, the values are ORed together.

In the following example, all editions of “Microsoft Windows 7” are included, and also “Microsoft Windows Vista Home Premium”:

{
    "type": "string",
    "version": "Microsoft Windows 7",
    "edition": "Microsoft Windows Vista Home Premium"
}

In the following example, the type is stringArray. Note that an array needs to be passed if the type is set as such, even if it is to contain only 1 element. In this case, the version can be either “Microsoft Windows 7” or “Microsoft Windows 8” (which are ORed together). Also, clients running on “Microsoft Windows XP Professional” are to be included.

{
    "type": "stringArray",
    "version": ["Microsoft Windows 7", "Microsoft Windows 8"],
    "edition": ["Microsoft Windows XP Professional"]
}

Special filter: geography

The geography filter is made up of 3 granularity levels. These are continent, country, and usState. The usState value applies only to United States. Continents and countries are presented in 2-letter codes. Countries follow ISO standard 3166-1 alpha-2. US states are presented in ISO 3166-2:US format.

In the following example, the clients have to be either:

  • In the continents Asia or Oceania
  • In the country Germany
  • In the US states New York, New Jersey, or Kansas
{
    "type": "stringArray",
    "continent": ["AS", "OC"],
    "country": ["DE"],
    "usState": ["US-NY", "US-NJ", "US-KS"]
}

IMPORTANT: In this filter, the type can be string or stringArray. Regular expressions are not supported in geography filters.

Special filter: gpu

The gpu filter is made up of 2 granularity levels. These are vendor and model. Both are represented as string values.

In the following example, the clients have have a GPU:

  • From the vendors NVIDIA or Intel
  • With the model number AMD Radeon HD 4600
{
    "type": "stringArray",
    "vendor": ["NVIDIA", "Intel"],
    "model": ["AMD Radeon HD 4600"]
}

Special filters: optOut and backOff

The opt-out was introduced in SDK version 5.1.0. With this feature, vendors can have their application report to the Revulytics servers that a user does not want to be tracked. With this feature, vendors can filter-out installations that were opted-out. Similarly, backoff filtering was introduced with version 5.0.0. Backoff is when a product account runs over-quota and the server starts rejecting data. Although filtering for backed-off installations was introduced with version 5, it was also backported to previous versions. However, when a new installation with an SDK prior to version 5 tries to register with the server and is rejected, it is not marked as being once backed-off when it is eventually accepted by the server. With version 5 onwards, the server flags an installation as being historically backed-off in such cases.

Both backOff and optOut filters are made up of 2 boolean sub-values: historical and current. The historical value refers to installations that were once backed-off or opted-out. These may include installations that are still currently backed-off or opted-out. The current value refers to the status during the last time that the client called the server. Therefore, if an installation was opted-out yesterday but got opted-in today, it will be marked as historically opted-out but not currently opted-out.

In the following example, for a client to be included, the optOut status has to either be historical AND not current, or else it can be not historical.

{
    "optOut":
        [
            {
                "historical": true,
                "current": false
            },
            {
                "historical": false
            }
        ]
}