Error configuration with Heatmap & Session Recording Tracking

Hello,

I installed the ‘Heatmap & Session Recording Tracking’ plugin on my Matomo server.

Following the initialization of a tracking sequence, the “System Check” gives me a small error:

Requesting 'http://localhost:6719/plugins/HeatmapSessionRecording/configs.php?idsite=1&trackerid=5lX6EM&url=http%3A%2F%2Ftest.test%2F' resulted in an error: curl_exec: failed to connect to ::1: permission denied. hostname requested was: localhost. As a result, tracking Heatmaps and Session Recordings may not work. You may need to change your webserver configuration to allow access to this file via the Internet or Intranet.

Impossible to understand this error, despite my research on the Internet (and also here)
I have already browsed this topic, without any improvements: No data with Heatmap & Session Recording - #2 by matthieu

My Matomo is not in https and it is installed on a LAN (accessible by VPN tunnels, hence the ‘localhost: 6719’).

All feedback is working well from my site, so the link is done correctly.

Moreover, the url returns me well a result in JSON (with a status 200):

Piwik.HeatmapSessionRecording.configuration.assign({"heatmaps":[],"sessions":[],"idsite":"1","trackerid":"5lX6EM"});

Is it necessary to have a Matomo with HTTPS? Is the problem caused by my network architecture?
Does a solution exist to overcome this problem?

Thanks in advance for the help !

Hi,

For Heatmap & Session Recording to work correctly the /plugins/HeatmapSessionRecording/configs.php URL has to be reachable for all website visitors. If you (and therefore also the website visitors) get the Piwik.HeatmapSessionRecording.configuration.assign response, it is set up correctly and the plugin should work correctly.

To make wrong configurations more obvious, Matomo’s System Check uses PHP curl to check if this URL works. For this Matomo tries to access http://localhost:6719/plugins/HeatmapSessionRecording/configs.php, but in you case this request fails with a “permission denied”. So something in your setup is blocking Matomo from requesting itself. This isn’t that much of an issue and if you know that the URL does work for website visitors (which is what matters), you can ignore it.