Developer Zone

Quick-Start Guide

System Requirements

The Revulytics Usage Intelligence .NET SDK can be used with .NET Framework versions 2.0, 3.0, 3.5, 4.0 and 4.5 including Client Profile editions.

Registering Your Product

Before you can use the Revulytics Usage Intelligence 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, CallHome URL, and AES Key from the Administration page (within the Usage Intelligence dashboard). From here you can also download the latest version of the SDK.

API Overview

When using the Revulytics Usage Intelligence API, there is one main class that you will have to integrate with RUISDK. You need to instantiate this class in the application. All Revulytics Usage Intelligence methods use this class.

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

Importing the SDK Files

Upon downloading the .NET SDK, you find 3 DLL files and an XML file as follows:

  • ruiSDKDotNet_<version>.dll - The shared library supporting .NET
  • ruiSDK_<version>.x64.dll - Native 64-bit DLL imported automatically by the .NET DLL
  • ruiSDK_<version>.x86.dll - Native 32-bit DLL imported automatically by the .NET DLL

Where <version> is the RUI SDK release version number in form N.N.N where N is a number.

You do not need to worry if your application will run on x86 or x64 platforms. If you do not target any specific platform, you should include both x64 and x86 DLLs with your application, and the Revulytics Usage Intelligence .NET DLL will import the correct one automatically. If, however, you choose to target a specific platform, you may include only the corresponding native DLL in order to make the installation size smaller.

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 (http://devzone.revulytics.com) and extract it to your preferred project location.

  2. Add a reference to ruiSDKDotNet_<version>.dll in your project.

  3. Add the directive using RUISDKCS_<VERSION> to the source files where you will be calling the Revulytics .NET SDK. <VERSION> is the current version number in the form N_N_N where N is a number.

  4. Create an instance of the RUISDK object.

    bool registerDefaultReachOut = true;
    String ruiSDKDLLPath = "<path to Revulytics Usage Intelligence SDK .NET library>";
    RUISDK mySDK = new RUISDK(registerDefaultReachOut, ruiSDKDLLPath);
    
  5. Create the configuration point 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 rights to this directory. The Call Home URL, the Product ID and the AES Key can be retrieved from the Administration page (within the Usage Intelligence dashboard). The protocol choice is based on the application and environment needs. Normally, HTTP protocol (port 80) will give applications the greatest chance of success in most environments. Multiple Session flag is a boolean value where you specify whether your application can have multiple user sessions per runtime session. This is normally false. For further details, refer to Single vs. Multiple session modes. The ReachOut Auto Sync flag indicates whether or not a ReachOutTM should be requested as part of each RUI SDK Automatic Sync. A ReachOutTM request will be made only if a ReachOutTM handler has been set by registering the default graphical handler (RUISDK) or a custom handler (RUISDK.SetReachOutHandler).

    String myPath = "<path to directory for RUI SDK logging>";
    String myProductId = "<Product ID>";
    String myAppName = "<Your App Name>";
    String myURL = "<CallHome URL without protocol prefix>";
    String myKey = "<Your AES HEX Key>";
    Int32 myProtocol = (Int32)RUIProtocolType.httpPlusEncryption;
    bool myMultiSessionSetting = false;
    bool myReachOutAutoSyncSetting = true;
    
    mySDK.CreateConfig(myPath, myProductId, myAppName, myURL, myProtocol, myKey, myMultiSessionSetting, myReachOutAutoSyncSetting);
    
  1. Call the method RUISDK.StartSDK. You must call this method 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 RUISDK.StartSession 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.
  2. Call RUISDK.StopSDK in the closing event of 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 RUISDK.StopSession and send the ID of the session that is being closed as a parameter.
  3. Before running your application, copy the DLL files ruiSDKCS_<vesion>.x64.dll and runSDKCS_<version>.x86.dll inside the BinDebug path (or BinRelease if you are compiling for release). These files are required by the Revulytics .NET SDK and must be included with your application. If you are building specifically for x64 or x86, you may then choose to include only the corresponding DLL file.

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

RUISDK mySDK;

public Form1()
{
    //Create instance of RUISDK
    bool registerDefaultReachOut = true;
    String ruiSDKDLLPath = "<path to Revulytics Usage Intelligence SDK .NET library>";
    mySDK = new RUISDK(registerDefaultReachOut, ruiSDKDLLPath);
    //Set the file path and connection information
    String myPath = "<path to directory for RUI SDK logging>";
    String myProductId = "<Product ID>";
    String myAppName = "<Your App Name>";
    String myURL = "<CallHome URL without protocol prefix>";
    String myKey = "<Your AES HEX Key>";
    Int32 myProtocol = (Int32)RUIProtocolType.httpPlusEncryption;
    bool myMultiSessionSetting = false;
    bool myReachOutAutoSyncSetting = true;

    mySDK.CreateConfig(myPath, myProductId, myAppName, myURL, myProtocol, myKey, myMultiSessionSetting, myReachOutAutoSyncSetting);

    //Inform Revulytics Usage Intelligence that the application has been started.
    mySDK.StartSDK();

    //Your program logic...
}

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    //Inform Revulytics Usage Intelligence that this runtime session is closing down and sync.
    mySDK.StopSDK(0);

    //Your program logic...
}

Next Steps

In the above section, we covered the basic integration steps. While these steps will 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. Refer to the following sections for more information: SDK 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 what 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 that include: