Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

User agent information can be identified when use the log analysis #3642

Closed
anonymous-piwik-user opened this Issue · 6 comments

2 participants

@anonymous-piwik-user

Here is the sample of the "user agent" from the iis log:

Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB7.4;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C;+.NET4.0E;+MS-RTC+LM+8;+InfoPath.2)

It turns out the browser is "Unknown" and also for the OS.

@anonymous-piwik-user

User agent information can NOT be identified when use the log analysis

Here is the sample of the "user agent" from the iis log:

Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB7.4;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C;+.NET4.0E;+MS-RTC+LM+8;+InfoPath.2)

It turns out the browser is "Unknown" and also for the OS.

@anonymous-piwik-user

It is working in the test file of "UserAgentParser", but not in the real case because in the "/core/Tracker/Visit.php", it is not using "urldecode" function for the user agent information, but test file.

Please check and re-open if I'm right. :)

@anonymous-piwik-user

Replying to matt:

detected as ie8 on win7

you can test yourself at: http://demo.piwik.org/libs/UserAgentParser/UserAgentParser.test.php?setUserAgent=Mozilla/4.0+%28compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB7.4;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C;+.NET4.0E;+MS-RTC+LM+8;+InfoPath.2%29

It is working in the test file of "UserAgentParser", but not in the real case.
Because in the "/core/Tracker/Visit.php", it is not using "urldecode" function for parsing the user agent information.

My solutions were:

1) I tried to use "urllib.unquote_plus" in python script to parse the "user agent" before sending requests to the Piwik
2) Also tried "urldecode" function in the "Visit.php"

But the visit report had different statistics, so I'm using "2" for now.

Please check and re-open if I'm right. :)

@anonymous-piwik-user

Replying to matt:

detected as ie8 on win7

you can test yourself at: http://demo.piwik.org/libs/UserAgentParser/UserAgentParser.test.php?setUserAgent=Mozilla/4.0+%28compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB7.4;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C;+.NET4.0E;+MS-RTC+LM+8;+InfoPath.2%29

btw, below "$userAgent = $this->getUserAgent($this->request);",

I added:

$userAgent      = urldecode($userAgent);

in the "/core/Tracker/Visit.php"

@mattab
Owner

(In [7777]) Fixes #3642 Thanks for the report

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.