API Docs for: 0.0.0

EqatecAnalytics

This is the API documentation for the Analytics plugin for AppBuilder.

This documentation is for version 3.4.1.

To start using this module you should enable the plugin in AppBuilder (in project Properties > Plugins > Integrated Plugins > Analytics). If you are using plugin version 3.3.1 or older you should initialize the monitor by including the initialization code example below somewhere in your application. When enabling the module you have the possibility to select automatic exception tracking or automatic app feature tracking. If you choose any of those options the module will start a new Analytics session in the "deviceready" event without the need to include this code.

See also:
Factory.CreateMonitor
Factory.CreateMonitorWithSettings
Factory.CreateSettings
Monitor.Start

 // Create the monitor instance using the unique product key
 // You should add this snippet to your application's startup code somewhere
 var productId = "YOUR-PRODUCT-KEY-HERE";
 var factory = window.plugins.EqatecAnalytics.Factory;       
 var settings = factory.CreateSettings(productId);
 settings.LoggingInterface = factory.CreateTraceLogger(); // please log
 factory.CreateMonitorWithSettings(settings,
   function() {
     console.log("Monitor created");
     // Start the monitor
     window.plugins.EqatecAnalytics.Monitor.Start(function() {
       console.log("Monitor started");
     });
   },
   function(msg) {
     console.log("Error creating monitor: " + msg);
   });

 ....

 // Elsewhere in your code you can further use the Analytics API to track app's usage
 // EXAMPLE BEGIN
 var mon = window.plugins.EqatecAnalytics.Monitor;
 mon.TrackFeature("Imaging.ProcessDraggedFolder");
 mon.TrackFeatureValue("Imaging.FolderSize", folder.length);
 mon.TrackFeatureStart("Imaging.ProcessFolder");
 try
 {
   // do processing
   mon.TrackFeatureStop("Imaging.ProcessFolder");
 }
 catch (ex)
 {
   mon.TrackFeatureCancel("Imaging.ProcessFolder");
   mon.TrackExceptionMessage(ex, "Image processing failed for " + folder.name);
 }
 // EXAMPLE END

This module has the following classes: