A click string is the URL that takes a user to an ad. Click strings are also be referred to as "click tags" or "tracking URLs". This article describes 2 options for finding the click string of an ad:
Network tracing
Network tracing allows you to review network activities relating to the Google Mobile Ads SDK. This includes finding the click string of an ad. A key reason to use network tracing instead of tools such as Charles Proxy is that it will work on all Android or iOS versions and devices.
The setup instructions for using network tracing can be found in the developer documentation for Android or iOS.
External web debugging proxy tools
You can use a debugging proxy, such as Charles or Fiddler, to view mobile session traffic logs and find the click string of an ad.
Requirements
- A web debugging proxy, such as Charles or Fiddler
- A Wi-Fi network that allows peer-to-peer traffic
- A desktop or laptop computer
- An iOS or Android mobile device
Proxy configuration
- Locate and copy your system IP address from your desktop or laptop computer.
-
Input your desktop's IP address as the proxy in your mobile device. Shown here is some general guidance on how to do this for Android and iOS devices. However, this may vary based on the device and version.
For Android devices:
- Open your Settings.
- Locate the Wi-Fi settings and select your Wi-Fi network.
- Select Show advanced options.
- Open the proxy settings and select the "Manual" option.
- Enter the IP address from step 1 as the proxy hostname.
- Enter
8888
as the proxy port. - Save your changes and/or exit the configuration settings.
For iOS devices:
- Open your Settings.
- Locate the Wi-Fi settings and select your Wi-Fi network.
- Open the HTTP proxy settings and select the "Manual" option.
- Enter the IP address from step 1 as the "Server".
- Enter
8888
as the "Port". - Save your changes and/or exit the configuration settings.
- Configure your web debugging proxy tool:
- Set the HTTP proxy port to
8888
. - (Charles only) If the "External Proxy Setting" is selected, deselect it.
- (Fiddler only) Select the "Allow remote computers to connect" option.
- Set the HTTP proxy port to
- Set up SSL (Charles only):
- In the menu bar, go to Proxy, then SSL Proxy Settings.
-
Click Add and enter the following host and port values:
- Host:
pubads.g.doubleclick.net
andgoogleads.g.doubleclick.net
- Port:
443
You may also consider capturing all traffic by entering an asterisk (
*
) as the "Host" and leaving the "Port" field blank. This can be useful when there's an issue outside the above two domains.
- Host:
- Click OK.
- Install the Charles certificate on your machine using Charles SSL setup guidelines.
- Once your device is proxying to your desktop/laptop machine, go to your phone's browser and type
http://www.charlesproxy.com/getssl
to download and install the machine certificate.
- Start capturing HTTP traffic from your mobile phone (Charles only).
- If an alert appears asking you to allow your mobile device to connect, select Allow.
- When you have finished capturing network traffic, be sure to turn off the proxy settings on your device by reversing step 2 (set the proxy to None).
- Review the log to find the click strings of the viewed ads.