Developer Zone

Event Tracking Management

These requests are used to get a list of event names and categories that have been reported by your application to Revulytics Usage Intelligence, know which ones have been enabled for collection, and also set which ones should be collected. At this stage, only listing of event names is available. To select which ones should be collected, please visit the old analytics UI.

Listing Event Categories and Names

POST /eventTracking/listEventNames

The request and reponse are both JSON objects. 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
  • showEvents (array) – An array of strings that can contain either “all” to list all known events, or else can contain “basic”, “advanced”, or both basic and advanced. This acts as a filter to show only those event names that have been enabled in the basic or advanced event tracking whitelist.
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 array. Present only if status is OK. Each array element represents a category. Each of these category elements is formatted as a JSON object and contains the following:

    • category (string) or (null) – Contains the name of the category or null if there are events which have not been assigned a category.
    • categoryEventNames (array) – An array of JSON objects - one element for each event name. Each of these JSON objects contains the following:
      • eventName (string) – The event name as reported by your application
      • basic (boolean) (optional) – Present only if showEvents is set to all or contains more than 1 item. Contains true if this event is enabled in basic event tracking collection.
      • advanced (boolean) (optional) – Present only if showEvents is set to all or contains more than 1 item. Contains true if this event is enabled in advanced event tracking collection.

In the example below, we are requesting for a complete list of all known event names. If we request for only events that have been enabled for basic event tracking, or similarly if we want only those that have been enabled for advanced tracking, the showEvents value should be [“basic”] or [“advanced”] respectively. If you are only requesting a single type, and not all or basic and advanced in a single request, the basic and advanced boolean properties would not be included in the response.

Example request:

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

{
    "user": "testuser@test.com",
    "sessionId": "VSB8E2BzSC2eZSJm4QmTpA",
    "productId": 12345678901,
    "showEvents": ["all"]
}

Example response:

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

"status": "OK",
"results": [
  {
      "category": "File Operations",
      "categoryEventNames": [
          {
              "eventName": "Open",
              "basic": true,
              "advanced": true
          },
          {
              "eventName": "Save",
              "basic": true,
              "advanced": true
          }
      ]
  },
  {
      "category": "Install Wizard",
      "categoryEventNames": [
          {
              "eventName": "Step 1",
              "basic": true,
              "advanced": false
          },
          {
              "eventName": "Step 2",
              "basic": true,
              "advanced": false
          }
      ]
  }
]