Individual paid : sub domain and wordpress not working

Hi,

We have an individual account on matomo : Individual - 50,000 pour 108.00EUR par year

We have a working wordpress multisite on many subdomains fsu86.fsu.fr fsu11.fsu.fr 34, 48,66 81 82 22, 14, 61, 76 etc…

The plugin does not send the specific traffic for each subdomain. We have the plugin matomo on ourwordpress.

Any idea ? (Im not the developper)

Thanks

Hi, just to be sure: Do you know if the plugin is configured in WordPress/WooCommerce? You can configure it in “WooCommerce => Settings => Matomo”. Important: You need to set a token_auth (with admin access) for the site you want to track. If the token is not valid, it will show an error message. Could you verify that it is configured currently?

1 Like

Hi, for what I know

We have a valid shared token,

Mode Piwik : cloud hosted
piwik subdomain :fsu
token_auth : &153f55**********************

Things are, I have no stats for my multiple subdomains (fsu86.fsu.fr for example)

EDIT : in my matomo cloud : fsu86 is ID :5 in wordpress id is : 1 (like all the others but fsu34.fsu.fr) I’m really lost :confused:

Thanks :slight_smile:

We had a look and noticed two problems

  1. Ecommerce is not enabled for your websites in Matomo. You can activate them by going to Sign in - Matomo and then edit each site and select “Ecommerce enabled”

  2. Independent of this, we noticed that your tracking code is embedded twice on your website fsu86.fsu.fr I recommend to keep only one of them as it can lead to tracking problems.

Could you try to make the changes and see if it works?

Hi,

Thanks for your answers.

  1. We don’t sell anything, no commerce, we are a union
  2. I’ll try to give you more details.

a. We have a master site: fsu.fr , with no matomo code (we will do this in the future)
b. On the matomo pannel we can’t get beyond 5 websites, I think we only need to have fsu@dot-fr (qorry one link for new user), and that the developper did it wrong (but I may be wrong to :wink: ) : Screenshot 2018 02 15 at 17.41.13 - tof.cx
c. We have the WP-piwik plugin installed on our network wordpress (multisite), even if the author said it’s beta . Here is the code pushed,

<!-- Matomo -->
<script type="text/javascript">
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//fsu.innocraft.cloud";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '3']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

I think it’s wrong to, we do not need to setId, but use the one in the matomo manual

_paq.push(['setDocumentTitle', document.domain + "/" + document.title]);
_paq.push(['trackPageView']);

But I may be wrong.
I don(t know ho the wortdpress plugin can push the specific subdomain statitics to the subdomain admin panel.
I think I need to use manual entry for the code in the plugin.

Hope it can help resolve my problem.

Sorry re the ecommerce. As it was posted in the premium plugins category I assumed you are having trouble with the Woocommerce premium feature.

We had a look again and it seems like the tracking requests are sent and data should be shown in the UI. The only thing we noticed is that on all of the websites the tracking code is embedded twice with different settings.

For example FSU86 has those 2 embedded:

<script type="text/javascript">
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//fsu.innocraft.cloud/";
    _paq.push(['setTrackerUrl', u+'js/index.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'js/index.php'; s.parentNode.insertBefore(g,s);
  })();
</script>

and this one

<script type="text/javascript">
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//fsu.innocraft.cloud/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '3']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>

but you want to likely only keep the last one. Do you know if WP-Piwik added both of them or whether you (or someone else) embedded one of them manually somehow?

It should have only one tracking code embedded.

I think it’s the developper who added the code twice, I’m gonna ask him.

What I want to know is why I’d add this code with siteID, because I can’t get more than 5 sites on maotomo cloud anyway. COuld you check fsu11.fsu.fr or 34, 48,66,81,82. Is this really the right way to handle multisite, multi subdomain ? With site ID ?
We are gonna have more than 100 subdomains ? I though we have to add the former code I added above (the one with domain and trackpageview).

Thanks again !!!

FYI: To track more websites you can either upgrade to a higher plan which allows you to have more websites, or you can track all your sites into one website, and then use segmentation (Segmentation - Compare segments of visitors - Analytics Platform - Matomo) to get the statistics for each subdomain.

Thanks,

We will have only subdomains, So we can’t use this in the doc ?

sAw it here:

https://developer.matomo.org/guides/tracking-javascript-guide