Is it possible to host the JS scripts on my own server?
Is it possible to host the JS scripts on my own server, while using either Community Edition or Cloud edition?
If I will use community edition, I need to host the scripts and the backend on different servers. How to do that?
The reason why I need the script on my own server, is security requirements. I also need to link to the source of the scripts.
yes, for the community edition there's not even another way. who else would host the scripts for you?
@whysthatso Please, note the above "I need to host the scripts and the backend on different servers." I need to extract the scripts and put them to another server (while possibly using Cloud API rather than community edition for the rest of the system).
My server from which I need to serve JS is incapable of such stuff as "<%= @config_js %>". Instead I need ready JS files (with no preprocessing) to serve from my server. I need to put on this server only JS, not the rest of the software (the rest of plausible could be from the cloud or on my own server, but that's a different server than one I want to serve JS).
That's typical ICP blockchain project requirements, by the way.
👋 @vporton
Not sure if I understand correctly, but it seems like the next version of the tracking script would be published on NPM: https://github.com/plausible/analytics/pull/5459
But before that gets into CE, maybe you can download the script from the <script> tag src shown during the installation process and save and serve it from someplace else? You would need to repeat this process every time you upgrade the container image.
it seems like the next version of the tracking script would be published on NPM
There's been a tracking script on npm even before the new version: https://www.npmjs.com/package/plausible-tracker
That's generally the best approach - use the npm package and bundle it with the rest of your app's JavaScript.