Troubleshoot 3rd-party Player - JavaScript

Troubleshooting the video heartbeat library integration revolves around the extensive tracing/logging mechanism that is in place throughout the entire video-tracking stack. Both the video heartbeat library and the underlying data-collection code inside the AppMeasurement library are equipped with this tracing/logging infrastructure.

  1. Activate tracing at runtime.
    Tracing can be activated at run-time via the debugLogging configuration flag:
    var ConfigData = ADB.heartbeat.ConfigData;
      
    // Instantiate the configuration object.
    var heartbeatConfig = new ConfigData();
    
    // Set this to true to activate the debug tracing
    heartbeatConfig.debugLogging = true;
     
    videoHeartbeat.config(heartbeatConfig);
    Below is a sample trace line for an JavaScript implementation:
    INFO [media-fork::TimerManager] > #_onTick() > ------------------- (3) 
    Each trace line is made up of the following sections:
    • Level - There are 4 message levels defined: DEBUG, INFO, WARN and ERROR.

      (This info is actually marked as a small icon on the left of the trace message, rather than the text shown in the sample above.)

    • The class name that issued the trace message
    • The method in which the trace message originated (it starts with the '#' symbol)
    • The actual trace message (following the '>' symbol)
  2. Looking at the network calls that are issued by the video heartbeat code.

    One of the configuration options exposed by the AppMeasurement public API is a boolean flag called debugTracking. This flag causes the Heartbeat code to display on the console the actual URL that represents the outbound network call. If your browser of choice allows filtering, you can filter for the __job_id string. The result is a very nice view of all the network calls issued by the Heartbeat core engine. Below is a code snippet that demonstrates the activation of the debugTracking configuration flag:

    appMeasurementObject.debugTracking = true;