How to read Data activation tracking events on mobile

Prev Next

This article describes how to capture and inspect HTTP and HTTPS traffic from a mobile device to verify your Data activation implementation. This is useful when troubleshooting a mobile Data activation setup that uses a native app or web view.

The steps in this article cover Android devices. The same approach works on iOS, but the proxy configuration steps differ depending on your iOS version and network settings.

Before you begin

To follow the steps in this article, you need:

  • A desktop or laptop computer with a wired (Ethernet) internet connection

  • Fiddler Classic installed on the computer

  • A mobile device with your Mobile App (pointing to your Test or Production environment) installed

  • Enable mobile hotspot on your computer and connect your mobile device to this hotspot network

Ping the mobile device's IP address from the computer to confirm the two devices can communicate before you start.

Instructions

Step 1: Set up Fiddler

  1. Open Fiddler on your computer.

  2. Go to Tools and select Options.

  3. Select the Connections tab.

  4. Select the Allow remote computers to connect checkbox.

  5. Restart Fiddler for the change to take effect.

Fiddler is now listening on port 8888 by default. You can change the port in the same Connections settings.

Step 2: Configure the proxy on your Android device

  1. On your Android device, open Wi-Fi settings.

  2. Tap and hold your current network to open the network details.

  3. Select Manage network settings.

  4. Select Show advanced options.

  5. From the Proxy dropdown, select Manual.

  6. In the Proxy host name field, enter your computer's IP address. To find the IP address, hover over the Network Connection icon in the Fiddler toolbar.

  7. In the Proxy port field, enter 8888 (or the port you configured in Fiddler).

  8. Click Save.

Your device's traffic should now be visible in Fiddler.

Step 3: Enable HTTPS traffic capture

With the setup above, you can capture HTTP traffic. However, if you try to open any HTTPS website, you’ll get the This site’s security certificate is not trusted! error. To fix this, you should trust the Fiddler root certificate.

Note

By default, the Fiddler-generated certificate is valid for 5 years, which can cause an ERR_CERT_VALIDITY_TOO_LONG error in Chrome on Android. To avoid this, shorten the certificate validity before installing it:

  1. In Fiddler, run about:config in the QuickExec bar.

  2. Create a new variable named fiddler.certmaker.ValidDays and set its value to 820.

Install the Fiddler root certificate on your Android device:

  1. On your Android device's browser, go to http://ipv4.fiddler:8888.

  2. Download the Fiddler root certificate.

  3. Install the certificate on your device.

You can now capture HTTPS traffic from your mobile device in Fiddler.

After you're done

When you've finished debugging, remove the proxy configuration from your Android device's Wi-Fi settings to restore normal network behavior.

If you have questions about the implementation, contact our support team at support@relay42.com.