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
Excluded User Agent still tracked #7978
Comments
Looking at the code it seems to be a unquoted comma separated list. But that might not be that good at all, as some useragents might also contain a comma. |
Yes you need to set the user agent without quote. Does it work for you after removing the double quotes? |
IMO it would be most intuitive and easiest to paste user agents one per line, and have Piwik automatically take care of enclosing double quotes. These are the two ways users will find the UA strings, from various sites (without quotes), or from server logs (with quotes). Comma-separate adds unnecessary complexity and potential for breakage if comas aren't escaped correctly. |
Actually the textarea field should accept one user agent per line, not comma separated. If one user agent per line does not work, please let us know, it's a bug we would fix ASAP |
|
Suggested fix:
In other words: when user forgets to remove enclosing double quotes, we do it for her |
@mattab The fix I posted handles the "remove the enclosing double quotes" part. And the function checkAndReturnCommaSeparatedStringList already does the "(+ trim)" part. So, could you suggest what else we should consider or is the current fix sufficient? |
as mentioned in #8050 useragents might contain quotes, so simply removing them is not accurate |
we should remove the enclosing quotes only, eg. using the second parameter of PHP trim function |
Before this commit, users can configure excluded user agents by separating them with commas. Enclosing quotes are not trimmed. With this commit, users can configure excluded user agents one per line. Enclosing quotes are trimmed. This is meant to be simpler and more consistent. It also allows to exclude user agents containing both commas and quotes. This change applies both to global settings as well as site-specific settings. This commit also changes the help text, which now explicitly says that user agents should be separated by new lines. A migration script is included: it will replace commas by new lines. Related: #7978, #8050
PR in #8586 |
…turns Before this commit, users can configure excluded query parameters by separating them with commas. With this commit, users can configure them one per line. This is meant to be simpler and more consistent (see #8448). This is now also consistent with form inline helps. This change applies both to global settings as well as site-specific settings. A migration script is included: it will replace commas by new lines. Related: #7978, #8050
Before this commit, users can configure excluded IPs by separating them with commas. With this commit, users can configure them one per line. This is meant to be simpler and more consistent (see #8448). This is now also consistent with form inline helps. This change applies both to global settings as well as site-specific settings. A migration script is included: it will replace commas by new lines. Related: #7978, #8050
There is a PR for that but it's targeting 3.0 . Can we maybe move this issue out of 2.15 into 3.0? Maybe a solution that is ok for now would be to just mention in the inline help to not put them into quotes? |
Edit see also #14880 |
I had configured the following string under the Websites -> Global list of user agents to exclude:
It belongs to the Monitor.us service.
Yet later I still saw that bot in the Real-time Visitors:
Do I maybe need to add the user agent string without quotes? By the way, there's no explanation of the format in which UA strings should be entered in that box. Presumably, one per line, but who knows? CSV format? Quoted or not?
The text was updated successfully, but these errors were encountered: