@mattab opened this Issue on September 10th 2019 Member

Specifying User-agent to exclude for a website does not work.
Visits with a User-Agent specified in 'Website > Excluded User Agents' are sometimes still tracked.

Reproduce

  • In Administration > Global websites settings > Global list of user agents to exclude, check that Enable website specific user agent exclusion is un-checked (this is the default)
  • Go to Administration > Websites > Edit
  • Under "Excluded User Agents", enter iplabel and click Save
  • Visit matomo.php?idsite=1&rec=1&test&debug=1&ua=Mozilla/5.0 (X11; CrOS x86_64 8172.45.0 ;iplabel) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.64 Safari/537.36&debug=1 to generate a request with a user agent containing iplabel
  • Got: the visit is tracked.
  • Expected instead: visit excluded.

Bug origin

Once we click the checkbox Enable website specific user agent exclusion. under Administration > Global websites settings > Global list of user agents to exclude, then the User agent specified in the "edit website" works as expected and the visit is excluded.

Solutions

  • either remove that checkbox completely and always enable this feature
  • or leave the checkbox and hide the "excluded user agent" setting in the Website Edit screen. + also throw an exception in the API if the value is set on a website.
This Issue was closed on November 28th 2019
Powered by GitHub Issue Mirror