Device Detection for HTTP Tracking API

We are using server side tracking using the PHP library.
I can’t seem to be able to find a way to track the device and
model info with this setup?

There are not HTTP tracking parameters for this option.

Hi,

I am not sure, as I haven’t used the PHP client before, but you can set the User Agent and DeviceDetector (a part of Piwik) will use it to detect the device information.

From the documentation:

If this function is not called, the User Agent will default to the current user agent.

So it is already using the current User Agent. The Problem is that there seems to be now tracking parameter for the user agent or device/model.

Indeed, I have missed that.

Have you checked if the useragent you are sending is supported by DeviceDetector?
http://devicedetector.net/

Ahh you know what. I mocked mobile devices with Firefox dev tools, but
if I don’t override the user Agent to a e.g. Android device on Chrome it still finds out
that I use Firefox on Linux and sets that in PHP.

I guess if the Operating System is e.g. set to Linux it won’t search in the Device Detector for
Android Device Info in the User Agent.

That’s quite possible. As User Agents are a huge chaos[*], DeviceDetector needs to make some assumtions.

Does it work correctly with an real phone?

[*]
Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; RM-1141) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537
is the useragent of a windows phone.

Yap. Works now. Thanks a lot for your help m8.

1 Like