HTML5 Debug Mode

Important: The HTML5 debug mode should only be used for manual debugging, because messages or information structures may change.

From version 2.1.16.17.0, debug mode is available in the HTML5 Pulse SDK and all its derivatives (HTML5 Ad Player and all the HTML5 plugins). Debug mode enables the SDK to send log messages about what is happening in the integration to a console, and helps you to manually debug issues. The log messages relate to:

  • API calls received by the SDK

    API log example
  • Events sent by the SDK

    Event log example
  • Errors reported by the integration

    Error log example
  • Internal logic of the SDK

    SDK logic log example

When errors are logged, the message may contain a VAST error code. The VAST Error Codes Table in IAB's VAST 4.0 document contains the descriptions for these error codes.

When to Use HTML5 Debug Mode

There are two main use cases for the HTML5 debug mode:

  • Developers can use it during the development phase, to see if their integration with Pulse works as it should and all information is sent in the correct order to Pulse. More information about the expected exchange of information between Pulse and the integration can be found on the Pulse SDK Event Sequence Scenarios page.
  • Ad operators can use it to investigate why a campaign with third party ads is not delivering. Some of the third party ad issues that operators may encounter are explained here.

How to Enable Debug Mode

You can enable the debug mode in the following ways:
  • Add ?pulse_debug at the end of the URL where your integration is located. For example, mysite.com/player?pulse_debug.
  • In the debug console of your browser, enter OO.Pulse.debug = true while your browser is on the page where your integration is located. For example, in the Console of the Developer Tools of Chrome:

    Developer Tools - Console - Chrome - to enable Pulse debugging
  • Add OO.Pulse.debug = true in your code, after loading the SDK. For example, in the body of the HTML page of your player, you could add:

    <body>
    ...
      <script type="text/javascript">
        OO.Pulse.debug = true
      </script>
    ...
    </body>
    Note: Remember to remove this line from your code before deploying it to your production site.

Using Preview Mode to Debug a Specific Ad

Note: Using pulse_preview does not return or record tracking events for the specified ad, when the ad is not a VPAID ad. In case a VPAID ad is returned, then the HTML5 Pulse SDK has no influence over any trackers triggered by the VPAID ad.

Another part of HTML5 debugging is the preview mode, where you select to preview and possibly debug a specific ad. To use the preview mode:

  • Add ?pulse_debug&pulse_preview=<UUID of the ad> at the end of the URL where your integration is located. For example, mysite.com/player?pulse_debug&pulse_preview=58f1a009-0bd1-47f9-ad3c-8946b1cf8863.

Third Party Ad Debugging

Media File Timeout

The third party provides a valid VAST ticket, but loading the suitable media file takes too much time:

HTML5 debugging output for timeout on media file.

Media File Not Found

The third party provides a valid VAST ticket, but the URL for the suitable media file is not valid:

HTML5 debugging output for unfound media file.

No Media Files Present

The third party provides an invalid VAST ticket, because there are no media files present:

HTML5 debugging output for missing media files in VAST ticket.

The log also contains the VAST error code telling you that the ticket's format is not according to the VAST standard.

Unsupported Media File Type

The third party provides a valid VAST ticket, but none of the media files have a compatible MIME type:

HTML5 debugging output for no supported media files found in VAST ticket.

This error also occurs when a VPAID is passed that is not compatible with your integration.

Cross-origin Resource Sharing Issues

A third party VAST ticket or a media file is available, but it cannot be accessed due to a CORS issue:

HTML5 debugging output for CORS issue.

The provider of the VAST ticket or asset should enable your domain to have access. Alert the advertiser of this issue.

VPAID Incompatibility

The third party provides a valid VAST ticket, but the VPAID ad they provide does not have a MIME type compatible with your integration. In the following case, a Flash based VPAID ad is passed in (MIME type is application/x-shockwave-flash), but the integration is set to only handle Javascript based VPAID ads:

HTML5 debugging output for incompatible VPAID.

Was this article helpful?