Heat maps plugin with Matomo installed in intranet

My customer has Matomo installed to track their intranet. For security reasons, the Matomo scripts are installed onto their server, while the PHP server (with Matomo) is in cloud. I tried to install the heatmap plugin, and it installs ok, but does not start to log data. The System Check claims that:
“Requesting 'https://matomo./plugins/HeatmapSessionRecording/configs.php?idsite=1&trackerid=&url=http***** resulted in an error: curl_exec: resolving timed out after 2512 milliseconds.”

I can open the configs file both from external network and from the intranet, so that does not seem to be an issue. But I started to wonder whether it is OK to have the plugin installed to the PHP server on cloud, or should I install those files within the intranet? Further, maybe the path to analytics points to wrong address and therefore Matomo cannot open the right files?

This was resolved within our support service.