Quick-Start Guide

System Requirements

The Revulytics Usage Intelligence C++ SDK for Linux has been tested with RedHat 5, RedHat 6, CentOS 6.7, Debian 8.4, Debian 8.5, and Ubuntu 14.04. Both 32-bit and 64-bit builds of the Revulytics Usage Intelligence shared library are provided. The Revulytics Usage Intelligence shared library loads in any dependent libraries automatically.

Registering Your Product

Before you can use the Revulytics Usage Intelligence Software Analytics service or integrate the Revulytics Usage Intelligence SDK with your software, you must first register an account by visiting: https://www.revulytics.com/register Once you register a username and create a new product account for tracking your application, you can get your Product ID and CallHome URL from the Developer Zone (within the login area). From here you can also download the latest version of the SDK.

Importing the SDK Files

Upon downloading the Revulytics Usage Intelligence C++ SDK, you find a header file - trackerbird.h, and two directories - one for 32-bit (x86) and one for 64-bit (x64).

These directories contain the Revulytics Usage Intelligence shared library. The .h and the shared library should be copied into your source directory. You must also do an #include to include the header file. The shared library (x86 or x64) must be copied to your binary path, depending on the architecture that you are targeting.

NOTE: If you plan to integrate the Revulytics Usage Intelligence SDK into a plug-in framework and expect to have plug-ins that are also using Revulytics Usage Intelligence there are special considerations on how this integration is to be done. Please contact Revulytics Usage Intelligence support (support-rui@revulytics.com) for more information.

In order to download the Revulytics Usage Intelligence SDK, please go to the download page at http://devzone.revulytics.com

Basic Integration Steps

The most basic Revulytics Usage Intelligence integration can be accomplished by following the steps below. It is however recommended to read the more advanced documentation as Revulytics Usage Intelligence can do much more than the basic functionality that can be achieved by following these steps.

  1. Download the latest SDK (contact support-rui@revulytics.com for download link) and extract it to your preferred project location.

  2. Create a Revulytics Usage Intelligence SDK instance. The value returned from the call will be used in all subsequent Revulytics Usage Intelligence API calls.

    TBINSTANCE* tbInstance = tbCreateInstance();
  3. Initialize the path to the directory where the Revulytics Usage Intelligence SDK will create and update files. The application using Revulytics Usage Intelligence will need read and write access to this directory.

    TBRESULT rc = 0;
    rc = tbSetFilePath(tbInstance, "<path to directory for Revulytics Usage Intelligence SDK logging>");
    if (rc != TB_OK) {
              //Your program logic to handle error...
  4. Initialize the SDK configuration similar to the below example. Your CallHome URL and product ID can be retrieved from the Revulytics Usage Intelligence Developer Zone (inside your login area). “Multiple Sessions Enabled” (multiSessionsEnabled parameter) is a boolean value where you specify whether your application can have multiple user sessions per runtime session. This is normally false for desktop applications. For further details, refer to Single vs. Multiple session modes.

    tbCreateConfig(tbInstance, "<CallHome URL starting with http://>", "<Product ID>",
    "<Your product version>", "<Your product build number>",
    <Multiple Sessions Enabled>);
  5. Call the function tbStart(). You must call this function first, before making any other Revulytics Usage Intelligence API calls. It is recommended that you place this call at the entry point of your application so the Revulytics Usage Intelligence SDK knows exactly at what time your application runtime session was started. If using multi-session mode, you also need to call tbSessionStart() when a user session is started, and also provide a unique user session ID which you will then also use for closing the session or for Feature / Event Tracking.

  6. Call tbStop() when closing your application so the Revulytics Usage Intelligence SDK knows when your application runtime session has been closed. If using multi-session mode, when user sessions are closed, you should call tbSessionStop() and send the ID of the session that is being closed as a parameter.

  7. Call tbDestroyInstance() after the call to tbStop() to allow the Revulytics Usage Intelligence SDK to release any resources it used.

  8. All of the other functions in the Revulytics Usage Intelligence API can be called at any point in your application as long as the Revulytics Usage Intelligence SDK has been initialized by calling tbStart().

The following is an example of the basic integration outlined below. This example uses single-session mode.

//Initialize the Revulytics Usage Intelligence Configuration
char* purl="http://INSERT-YOUR-UR";
char* pproduct_id="INSERT-YOUR-PROD-ID";
char* pproduct_version="1.2.3";
char* pproduct_build_number="4567";
bool pmulti_session_enabled=false;

TBINSTANCE* tbInstance = tbCreateInstance();

if (!tbcInstance) {
    //Your program logic to handle failure of Revulytics Usage Intelligence SDK to initialize.

TBRESULT rc = 0;
// tbSetPath
rc = tbSetFilePath(tbInstance, filePath);

if (rc != TB_OK) {
    //Your program logic to handle error...

tbCreateConfig(tbInstance, purl, pproduct_id, pproduct_version, pproduct_build_number, pmulti_session_enabled);

//Inform Revulytics Usage Intelligence that a new runtime session has been started.
tbStart(tbInstance, TB_START_SYNC);

//Your program logic...

//Program closing - inform Revulytics Usage Intelligence that this runtime session is closing down.
//Clean-up resources used by Revulytics Usage Intelligence SDK

//Your program logic...

Text encoding

In all cases where a text value is used, char* is the data type that is used. Also, if non-ASCII values are used, they are encoded by the SDK in UTF-16. If a non-ASCII text value needs to be passed as a parameter, it should be encoded in UTF-16 by the user application.

Next Steps

In the above section, we covered the basic integration steps. While these steps would work for most software products, it is recommended to do some further reading in order to get the most of what Revulytics Usage Intelligence has to offer. It is recommended to go into more detail by reading the pages SDK Initialization and Configuration and Basic SDK Control. Once you are familiar with the SDK, you may look at the advanced features.

Advanced Features

By following the Basic Integration Steps above, the Revulytics Usage Intelligence SDK will be able to collect information about how often users run your product, how long they are engaged with your software as well as which versions and builds they are running. The SDK also collects information on what platforms and architectures your software is being run (i.e. OS versions, language, screen resolution, etc.). Once you have implemented the basic features, you may choose to use Revulytics Usage Intelligence for more advanced features which include: