A call of help from iOS developers out there. I am trying to recognize different Ad Networks in mobile phones. For this the only data available to me are the URL from HTTP headers from the Apps and browser. I could identify certain Ad Networks like Admob, Jumptap easily with the url structure. For example, the admob one is something like this:
http://a.admob.com/*
http://p.admob.com/*
But I can’t figure how to identify iAds from Apple. Does anyone know what kind of URLs these produce?
Okay. I’ve done some snooping into the matter with the aid of a couple of iPhones and my local firewall/web proxy server here, and this is what I’ve found:
Alas, no hostnames to help you, either. The requests for both banners and ad units have IP addresses in the URLs, not hostnames. Which IP addresses, incidentally, appear to be Akamai content distribution servers all over the place; the addresses I’ve seen have mostly been in 70.183.* and 174.*, but no guarantees on that point.
The URL structures I’ve seen are quite complex. Stripping out and replacing with ~ the parts which I’ve observed varying over the few hundred requests I’ve sniffed gives me this as a URL pattern for a banner request:
And this for an actual ad being downloaded after a banner touch:
What may be of more use, if you don’t have any need to distinguish ad banner displays from clickthroughs, is to look for the user agent, which for all the banner requests is “AdSheet/1.0”. (Noting of course that there are multiple banner requests for any given banner being downloaded – all the different sizes the app writer indicates to iAd that he wants to use; and also that this is NOT the case when ad content is being downloaded, which just uses the iPhone’s regular user agent. But if all you’re wanting to do is detect that iAd is in use, etc., that probably doesn’t matter so much.)