Follow

ApTrak Function

 

ApTrak – tracking user interaction   

 

ApTrak is a API method provided in all Apmetrix SDK’s that enables you to track the exact location of events on any screen as they happen during the use of your game or application.  Depending on the game or application, coordinates for 2, 3 and 4-dimensional events (i.e. coordinates for Unity Vector3 and Vector4 objects) can be logged and later tracked along with all other event data that you have tagged.

 

The parameters used when tracking user interaction using ApTrak are:

  • Event – name of the event being logger
  • Location – location / screen the event occurred
  • X coordinate – (required) x coordinate of the event
  • Y coordinate – (required) y coordinate of the event
  • Z coordinate – (optional)  z coordinate of the event
  • W coordinate – (optional) w coordinate of the event

Below are examples of function calls to the ApTrak API method when wanting to track the application’s “player died” event, that occurred on “screen 2”, at the coordinates x = “13.25”, y = ”480.5” and z = “32.75” (there is no w – coordinate):

 

      a. For Android applications the function call would be:

 

Apmetrix.ApTrak(“player died”, “screen 2”, “13.25”, 480.5”, “32.75”);

 

      b. For iOS applications the function call would be:

 

[Apmetrix ApTrak:@“player died”, @“screen 2”, @“13.25”, @480.5”, @“32.75”, nil];

 

      c. For ActionScript  applications the function call would be:

 

Apmetrix.ApTrak(“player died”, “screen 2”, “13.25”, 480.5”, “32.75”);

 

      d. For Unity C# Script applications the function call would be:

 

Apmetrix.ApTrak(“player died”, “screen 2”, “13.25”, 480.5”, “32.75”);

 

 

The ApTrak method returns an integer value to indicate the status of thefunction call.  Values for the status can be:

 

0 - SUCCESS

The method functioned successfully

103 - WARNING_IGNORED_SESSION_NOT_OPEN

The function call was ignored because it was called when a session was not open.  See init() or restartSession().

104 - WARNING_IGNORED_SOME_EVENT_PARAMETERS

The function call was ignored because there were more parameters than what is permitted for this method.

201 - ERROR_INVALID_ARGUMENTS

An error occurred because the minimum number of parameters were not included

203 - ERROR_EVENT_DROPPED

The function was dropped because the internal queue has exceeded its limits.

204 - ERROR_FAILED

An internal error has occurred.

 

Have more questions? Submit a request