Network Tracing

Network tracing allows you to see network activities relating to the Google Mobile Ads SDK. This can be useful in debugging your Google Mobile Ads implementation.

A key reason to use network tracing instead of tools such as Charles Proxy is that it will work on all iOS versions and devices without trusting any third party security certificate profiles. This is not the case with proxying tools due certificate profile requirements in place since iOS 10.3.

This guide explains how to enable network tracing for debugging purposes.

Enable tracing

To enable network tracing, you will need an "enablement URL" for your application from a Google support engineer. Once provided, copy the application's enablement URL to the device's pasteboard. Then, launch or re-enter the app, and the following dialog will appear:

Tapping OK will enable network tracing. It can be disabled by force-quitting the app.

When network tracing is enabled, the Google Mobile Ads SDK logs network events to the console.

You can then provide copies of the logs to our engineers for analysis as a private reply on the developer forum.


Standard platform-appropriate console logs are used to output the network logs.

Console log messages always begin with the string GMA Debug BEGIN, GMA Debug CONTENT, or GMA Debug FINISH so that it can be searched for or filtered out. For each network log, the first log message is GMA Debug BEGIN, the last log message is GMA Debug FINISH, and the network log content begins with GMA Debug CONTENT. If a network log content is too long to fit on a line, it is split among multiple lines, each line beginning with GMA Debug CONTENT.

Sample output

<Your App Name>[2710:30568] <Google> GMA Debug BEGIN
2017-12-06 09:47:09.268020-0800 <Your App Name>[2710:30568] <Google> GMA Debug CONTENT: {
  "components" : [
  "timestamp" : 1512582429267.2629,
  "event" : "onNetworkRequest",
  "params" : {
    "firstline" : {
      "uri" : "<encoded text>",
      "verb" : "<encoded text>"
    "headers" : [
        "name" : "<encoded text>",
        "value" : "<encoded text>"
2017-12-06 09:47:09.275742-0800 <Your App Name>[2710:30568] <Google> GMA Debug FINISH

You can then provide copies of the logs to our engineers for analysis.

Send feedback about...

Need help? Visit our support page.