All Site ID revert to same on Self Hosted Wordpress

Hi,

We have a self hosted up to date Matomo service.

We have a more than 100 sites on wprdpress with Matomo plugin

Everything was ok, till a lot of recently massive problem (tracker gone, ID gone).

Now, all sites have the same ID on the wordpress plugin (2) not in the site manager on my self hosted matomo

Default tracker does not work with the wordpress plugin.

Here the the code We use

<!-- Matomo -->
<script type="text/javascript">
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['setVisitorCookieTimeout', '33696000']);
_paq.push(['setSessionCookieTimeout', '1800']);
_paq.push(['setReferralCookieTimeout', '15778463']);
_paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//url.domain.extension/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '{MATOMO_IDSITE}']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

Hi @hubertes
Isn’t a problem on WP more than a problem on Matomo?
If {MATOMO_IDSITE} is well set in your pages (check in each tracked site), it should work as expected…
Try also to check if the tracking code is set only once per page…