6

I am currently using AWStats to analyze the apache logs for a server that redirects links, etc from iOS apps to the app store (so we can track clickthrough). In AWStats, however, all of this traffic is grouped into 'Mac OS X' in the Operating Systems category. This obviously isn't very helpful for us. What we really want is not only detection of iPhone vs. iPod Touch vs. iPad, but also iOS version numbers, hardware generational differences, etc.

I don't think generational differences (iPhone 3G vs. iPhone 4, for example) can be easily retrieved through http logs, but I know that iOS versions are right in the user agent string.

None of my attempts to get AWStats to recognize iOS have worked at all, though. I moved the line that's supposed to do the trick up above Mac OS X, to no avail. Has anyone managed to do this, in AWStats or otherwise? I'd be fine moving to a different system, if that's what it takes.

For the record, browser detection works fine, it can easily distinguish between mozilla, safari, iPhone safari, and iPad safari.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248

1 Answers1

7

I'm not sure but the following changes in operating_systems.pm seem to work for us. Only the iPod didn't work in the OS section, it should be incl. under iPhone ...(not sure)

in @OSSearchIDOrder add

'[_+ ]cpu[_+ ]os', #iPad
'iphone[_+ ]os',

before

'mac[_+ ]os[_+ ]x',

in %OSHashID add

'[_+ ]cpu[_+ ]os','maciosipad',
'iphone[_+ ]os','maciosiphone',

after

'mac[_+ ]?p','macintosh','mac[_+ ]68','macintosh','macweb','macintosh','macintosh','macintosh',

in %OSHashLib add

'maciosiphone','<a href="http://www.apple.com">iOS (iPhone + iPod Touch)</a>',
'maciosipad','<a href="http://www.apple.com">iOS (iPad)</a>',

after

'macintosh','<a href="http://www.apple.com">Mac OS</a>',

You may additionaly want to add some icons in /icon/os (maciosiphone.png, maciosipad.png). Oh, we didn't need version numbers yet. But I think you can easily add this too (just have a look how they did this for windows etc.)

Hope this helps Best

cyberop5
  • 5
  • 2
Stef
  • 71
  • 1