Error with commas when adding user-agents to exclude
-
Hello,
our website is hit by Chinese bots coming from different IP addresses and the most efficient way to filter them from Matomo seems to be the two user agents that are always repeating. One of them reads
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36Its a pretty outdated user-agent (Mac OS X) so we are confident it only filters the bots. But when I enter this user-agent string in WordPress in Matomo Analytics – Settings – Exclusions in the box labeled “Global list of user agents to exclude:” a weird thing happens. When I save and the page reloads, the user-agent strings is broken in two lines where the comma next to “KHTML,” is.
So instead of
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36I get (notice the missing comma after KHTML!)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTMLlike Gecko) Chrome/139.0.0.0 Safari/537.36So it seems to assume that the comma indicates a new line and removes it and enters a line break. I’m worried that this will filter now for user-agents containing either of the two lines and also will exclude legit users whose user-agent includes the string from the second line.
Is that a bug or am I doing something wrong?
Thanks!
The topic ‘Error with commas when adding user-agents to exclude’ is closed to new replies.