Debug event reporting
By default the Analytics SDK doesn't log much information 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 three options when it comes to debugging and/or confirming that the integration works as intended:
Enable logging in console
To view the debug messages about recording and uploading events in the Editor's console:
- Go to Project Settings > Player Settings > Player.
- Go to Script Compilation section > Scripting Define Symbols.
- Add keyword UNITY_ANALYTICS_EVENT_LOGS.
- Select Apply.
Note: It's advisable to remove logging before building for release.
View 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 Event Browser.
Web debugging proxy tools
Charles Proxy or Fiddler are examples of utilities 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 steps are:
- Install and configure Charles Proxy or Fiddler on your PC or Mac.
- Configure your Android or iOS mobile device to use your PC as a network proxy.
- Launch your game and monitor the network activity in Charles or Fiddler.