Tracking Tapatalk users with Piwik (Update)

Piwik is a nice open-source, self hostable tracking system like Google Analytics. It lists all the standart information like user browser, os, referral and associated metrics.

For the iPod-Forum i use this systems to get a chronological overview of the usage. I also use the integration of Tapatalk to get an optimized view for mobile users on iOS, Andorid and other mobile OS. What i missed is an integration of Tapatalk into the Piwik analytic tool, so i did it by myself.

All additional Code is used on your own risk! I used Piwik 1.12 to test it.

Tapatalk useragent
Thats the main problem. I hoped to get the mobile device out of the Tapatalk http useragent. I logged the useragents for a few hours, and received a lot of different agents:

Mozilla/5.0 Firefox/3.5.6 Tapatalk 2/2.0.3
Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 Tapatalk/1.16.0
Mozilla/5.0 Firefox/3.5.6 Tapatalk/
Mozilla/5.0 Firefox/3.5.6
Mozilla/5.0 Firefox/3.5.6 Tapatalk/2.4.10

There is just one version of tapatalk that sets the iPhone as device in useragent. The reason is the compatibility with common webservers according to Tapatalk developers. So I’m not 100% able to get the used deviced, but I’m able to filter the Tapatalk users out of the visitors using the useragent.

(mehr …)