10 Easy Steps to Connecting Over-the-Top (OTT) Devices to a Proxy
According to a survey report, there will be an estimated 33 billion internet-connected devices by 2020, with more and more users shifting for media engagement to over-the-top (OTT) devices, such as gaming consoles and smart TVs. As more organizations gear up for this trend, one of the most common questions that I get to hear from clients is around how they can simplify the process of connecting OTT devices to a proxy or packet analyzer so they can validate different tracking implementations on these devices.
It’s crucial to simplify the setup process of proxying connected devices and streamline tracking solution validation because only accurate tracking implementations will generate quality data to drive reliable analytics.
One way of achieving this is by using a “dd-wrt router.” For non-proxyable devices like OTT, smart TVs, etc., you’d need to have a router using a custom firmware (dd-wrt) that would be set up as a transparent web proxy. Since this approach has very specific hardware and technical expertise requirements, it might not be everyone’s go-to choice.
Getting started
3 points to keep in mind while using this method for proxying devices
1. This method only works on a Mac.
2. The setting up process uses a JavaScript that routes all the traffic on your shared connection from port 80 to Charles port 8888. If you like, you can write your own version of the script where you redirect HTTP traffic on Internet Sharing to a local Charles proxy.
3. Make sure both Heartbeat and Analytics settings have SSL set to false on the application level, otherwise you will not see any tracking pings. This should only be done for dev/debugging purposes, and production implementations should use SSL.
In this post, I will discuss an easy and streamlined process of successfully connecting a Roku device to a Charles Proxy.
While I am using Roku device as an example here, the process will be the same regardless of what connected device you are using. This method is very frequently used by Adobe Consulting, and following it step by step would hopefully make the tricky process of proxying OTT devices easier for you as well.
1. Before we begin, I suggest you run ‘node –v’ and ‘npm –v’ commands on the terminal. If the commands do not return the current version of node libraries on your machine like below, then you’d need to install node.
2. Once you have all necessary node libraries on your machine, you can download this script or use your own JavaScript. Remember to take a note of the directory where you saved the script.
3. Now that you have the proxy.js script downloaded, make sure you have a clean environment before we set up the connection. You can do any of the following:
- Reboot your machine
- Run the command ‘node proxy.js -d’ from command line
- Stop sharing connection on Mac
- Shut down Charles
At this point, you should not be sharing connection on Mac, neither should you have Charles Proxy running.
4. Connect your Mac to the internet using an ethernet cable.
5. Open terminal and go to the directory where you saved the script.
6. Run the script from your command line using the command ‘node proxy.js’.
7. Enable the connection by entering the command ‘node proxy.js -e’. You will be prompted to enter your password to successfully establish the connection.
8. Next, share the Mac Connection using Wi-Fi as described here.
9. Start Charles on you Mac. With your Roku connected and running, go to Network Settings and connect to your Mac’s shared Wi-Fi.
10. Once successfully connected to the shared connection, run the Roku app to build and initiate content playback. TA-DA! You can now see all the traffic from your device in Charles/Adobe Debug.
Once you have successfully connected your OTT device to a proxy, you can start validating your tracking implementations.
The process discussed above works successfully on OTT devices, like AppleTV, FireTV, Roku, and Chromecast as well as mobile devices. ****