Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5981

All Site ID revert to same on Self Hosted Wordpress

$
0
0

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 -->

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5981

Trending Articles