Matomo integration not activated for unautenticated user

In our setup we have Matomo plugin installed and configured with “Multiwiki enabled” on Main Wiki is not accessible for guests. Then we have more sub-wikis which are accessible for guests.

Any wiki activate the Matomo integration for unauthenticated guest users.

Matomo is activated just after the user is logged in.

Is it caused by the access rights on Main wiki?

Is there any workaround to make it work for unauthenticated users on all wikis?

We have 25 wikis, thus installation on Main wiki seems to be the best option.

Can confirm Matomo is loading when unauthenticated guests are able to view pages (setting in Rights).

We require the setting to block the access for unauthenticated guests, which leads to redirection to OIDC authentication page and automatic XWiki log-in from OIDC context.

Is there any workaround for Matomo plugin to work?

UPDATE
Installation to sub-wiki works for the particular sub-wiki, but the “multiwiki tracking” does not work. That seems we are required to have it installed on all sub-wikis.