What is the proper way to download a Matomo widget with cURL? The following code succeeds in obtaining what appears to be the widget’s HTML, but all of the CSS, javascript functionality, and imagery are lost.
Of course, CSS, images, JS is lost. You only (can) download the HTML via cUrl. CSS/JS etc. is only applied in the context you load it to (e.g. Matomo GUI).
Everywhere else, you have to apply your own Styles/UX. The only way to keep look&feel of the widgets without hassle is to embed them via iFrame.
The problem with getting Matomo widgets to download without hassle is the user must expose his authorization token and thereby the entire reporting API. I wish to avoid this.
Do you know the minimum file requirements to get the FrontController class to load properly?
Hi, Fabian. It appears that it would help, because the widget must be completely formatted before it is read into the src attribute of an iframe. Unfortunately, the wget application is not available on shared SSH servers.
Do you know of another application that can achieve the same?