This alleviates a variety of spurious "Invalid idSite: 0" issues as described in #12264. That issue was closed in 2019 but since then many of us have continued to see issues that do not seem to be rooted in client configuration errors, as suggested by https://github.com/matomo-org/matomo/issues/12264#issuecomment-474991737.
The process to do this is described here: https://github.com/matomo-org/matomo/blob/4.x-dev/js/README.md#deployment
@sgiehl I followed the instructions but the diff seemed a bit bigger than I expected. Let me know if the pushed .min.js files seems OK to you. FWIW I am on a Mac and I saw that it's technically unsupported. If it's a problem I can probably redo it from a Linux box.
@danielpunkass Looks all good. But seems someone else commited the
piwik.min.js by accident in the main folder before. I've pushed a commit to remove it from the PR again.
Thanks again for your contribution! This will be included in Matomo 4.11.