<br />

As of version 13.0.0, network tracing is no longer supported.

Network tracing lets you see network activities relating to
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](https://www.charlesproxy.com) 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](https://support.apple.com/en-nz/HT204477) in place since iOS 10.3.

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

## Enable tracing

To enable network tracing, set the `GADEnableNetworkTracing` key to `YES` in
your plist file.

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

## Logging

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" : [
        "network_request_31107D12-E54E-45D6-AEA9-4A303C659EDF"
      ],
      "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