Debugging

By default the SDK doesn’t log information about Events being sent by the Analytics service to the console to ensure it runs as efficiently as possible.

When setting up the SDK and instrumenting Custom Events in your game there are two options when it comes to debugging and/or confirming that the integration works as intended.

Enable logging in console (optional)

To view the debug messages for every Event sent in the Editor’s console:

  1. Go to Project Settings > Player Settings > Player.

  2. Go to Script Compilation section > Scripting Define Symbols.

  3. Add keyword UNITY_ANALYTICS_EVENT_LOGS.

  4. Click Apply.

Note: It’s advisable to remove logging before building for release.

Viewing events in the Event Browser

The Event Browser has an event stream where you can see both valid and invalid Events as they are sent by your game. Use this tool to confirm your integration and view errors and information about invalid events. See the Event Browser section.

Using Web Debugging Proxy Tools

Charles Proxy or Fiddler are examples of utilities that allow you to monitor network activity on your mobile device from your PC. When configured correctly, you can see individual network requests and responses as they're generated on your mobile device. This can be used to confirm that your game is sending events over the network to Analytics.

The general steps are as follows:

  1. Install and configure Charles Proxy or Fiddler on your PC or Mac.

  2. Configure your Android or iOS mobile device to use your PC as a network proxy.

  3. Launch your game and monitor the network activity in Charles or Fiddler.