Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
anonymous-matomo-user opened this issue Dec 25, 2012 · 6 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

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-matomo-user
Copy link
Author

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-matomo-user
Copy link
Author

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-matomo-user
Copy link
Author

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-matomo-user
Copy link
Author

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
Copy link
Member

mattab commented Jan 18, 2013

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

@anonymous-matomo-user anonymous-matomo-user added this to the 1.12.x - Piwik 1.12.x milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants