Instructions for C++

Thank you for choosing Software Statistics Service – a perfect tool for C++ application monitoring!

These instructions will help you to install and integrate Software Statistics Service tracker into your C++ application within a few minutes. If you experience any problems, please consult our online documentation. And, please don’t hesitate to contact us – we’re always glad to help.

Please see instructions for more technologies: Java, Delphi.NETMicrosoft SilverlightWindows Phone 7Windows Presentation FoundationJava for AndroidMac OS (Xcode)iOS (Xcode).

Technical Requirements:

C++

Microsoft Visual C++ 2010 Redistributable Package

NOTE! You can find Microsoft Visual C++ 2010 Redistributable Package as vcredist_x86.exe or vcredist_x64.exe in downloaded API

Integration

Do the following steps:

1. Include header file SoftwareStatisticsService.h in you code
2. Link Software Statistics Service library to your project, and simply use SoftwareStatisticsManager in your code as follows.

Usage

1. When application is started execute the following code:

SoftwareStatisticsInitParams params;
params.ProductKey = PRODUCTKEY;
params.ProductName = PRODUCTNAME;
params.ProductVendor = PRODUCTVENDOR;
params.ProductVersion = SSProductVersion(0, 0, 0, 1);
params.ProductPackage = PRODUCTPACKAGE;
params.UseSandbox = false; //or true
InitSoftwareStatisticsManager(params)->AppStart();

2. Use the following code to set proxy settings:

SSProxySettings proxySettings;
proxySettings.FAddress = _T("182.15.232.15");
proxySettings.FAutoDetectProxy = false;// or true
proxySettings.FDomain = _T("domain");
proxySettings.FPort = 80;
proxySettings.FUserName = _T("user");
proxySettings.FPassword = _T("pass");
GetSoftwareStatisticsManager()->SetProxySettings(proxySettings);

3. Use the following code to start SoftwareStatisticsManager:

GetSoftwareStatisticsManager()->AppStart();

4. Use the following code when you want to add some custom event with optional parameters:

SoftwareStatisticsEvent *eve = SoftwareStatisticsEvent::Create(_T("event name"));
eve->AddParam(_T("string parameter name"), _T("parameter value"));
eve->AddParam(_T("numeric parameter name"), 1 );
eve->AddLog(_T("log parameter name"), _T("log string"));
eve->AddException(_T("exception parameter name"), _T("exception string"));
GetSoftwareStatisticsManager()->AddCustomEvent(eve, true);

5. Use the following code to track application shutdown event:

GetSoftwareStatisticsManager()->AppFinish();

Please find demo application inside the package to see how to integrate SoftwareStatisticsServiceTracker into your C++ application and how to use its features. Also see help in Doc directory to get more information about types and functions.

Note: Software Statistics Service Tracker is designed to automatically collect anonymous usage information and transfer it to the Software Statistics Service host server. In addition this service allows you to collect your own custom data that may not be anonymous and violate user level agreement and country laws. You should include prominent option in your software informing users about such behaviour and allowing them to turn this feature off. Usual practice is to show such option during software installation and also add it to the software program options/preferences.

How to Test Your Integration

  1. Signup at software-statistics-service.com and create a new project.
  2. Create a new application and use Software Statistics Service Tracker client module in it as it is described in integration instructions.
  3. Copy Project Key from your account and set Project Key property of tracker module in your application.
  4. Make sure you’ve set UseSandbox property to “True”. When this option is used your data will be posted to our sandbox server which is faster but limited by the number of requests – up to 100 requests per project per day. In case you were trying integration and reached the limit you should create a new project and use another Project Key.

The very simple way to test is to run and then close your application. Software Statistics Service Tracker module will send data when application is about to be closed. If there are delays/troubles with internet connection, it will try to send data next time application is started.

Usually it takes up to 15 minutes between data transfer to the server and the moment when you can see them on the graphs under your account.

By default Tracker module collects such events as application start and shutdown as well as such data as RAM amount, number of CPU cores and CPU frequency, location and operating system i.e. very common usage information. If you want to track your own data e.g. number of times a button was clicked or feature was used you should use Custom Events.

Changelog

Check out our changelog for C++ from time to time to follow up with our latest updates.

Frequently Asked Questions

Please see Frequently Asked Questions
We are open to your suggestions and ready to discuss your needs and ideas at: support@software-statistics-service.com

Thank you for reading this far. Good luck with your e-business!

This component is copyrighted (c) 2010-2011 MagneticOne, Eleks
All trademarks are property of their respective owners.