Error 403 with Drupal when I enter Matomo (Piwik) server URL

As I already thought, there is a useragent blocker in place:

[13:38 dellwing@dellwing Downloads] > curl https://piwik.mysite.com/piwik.php
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.<br />
</p>
</body></html>
[13:38 dellwing@dellwing Downloads] > curl -H "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0" https://piwik.mysite.com/piwik.php
This resource is part of Matomo. Keep full control of your data with the leading free and open source <a href='https://matomo.org' target='_blank'>digital analytics platform</a> for web and mobile.

So you have two options:

  1. Modify the piwik Drupal-plugin to fake the user agent.
  2. Ask your shared hosting provider to remove this blockade.
1 Like