Thank you for reply and your advice.
I’ve found the problem, it was my fault.
By mistake I defined constant MATOMO_PROXY_FROM_ENDPOINT twice.
I enabled debugging and have found in console log following notice:
Notice: Constant MATOMO_PROXY_FROM_ENDPOINT already defined in /data/www/site.com/proxy.php on line 3
The notice error was in widget.php
widget.php code:
define(‘MATOMO_PROXY_FROM_ENDPOINT’, 1);
$path = “piwik.php”;
include dirname(FILE) . ‘/proxy.php’;
proxy.php code was taken from here https://raw.githubusercontent.com/matomo-org/tracker-proxy/master/proxy.php with some customizations.
So in proxy.php and widget.php was defined the same constant MATOMO_PROXY_FROM_ENDPOINT.
I commented in widget.php this line of code:
define(‘MATOMO_PROXY_FROM_ENDPOINT’, 1);
and now it works fine.
Thank you very much.