• Hello,
    We have had a Piwik instance for sometime. It’s running 2.2.2.

    WP-Piwik wasn’t getting any tracking code. I checked the access log on the Piwik instance. This is called:

    https://statistics.library.dmu.ac.uk/Piwik/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=1&period=day&date=last30&filter_limit=&token_auth=changedtoprotecttheinnocent&expanded=&format=PHP&url=https%3A%2F%2Fourdev.dmu.ac.uk

    and got:

    a:2:{s:6:"result";s:5:"error";s:7:"message";s:86:"You can't access this resource as it requires an 'view' access for the website id = 1.";}

    I added “view” for the first site for my WP user and get:

    a:30:{s:10:"2014-06-24";d:1596;s:10:"2014-06-25";d:1373;s:10:"2014-06-26";d:1266;s:10:"2014-06-27";d:1066;s:10:"2014-06-28";d:728;s:10:"2014-06-29";d:906;s:10:"2014-06-30";d:1485;s:10:"2014-07-01";d:2062;s:10:"2014-07-02";d:1351;s:10:"2014-07-03";d:1339;s:10:"2014-07-04";d:1086;s:10:"2014-07-05";d:728;s:10:"2014-07-06";d:814;s:10:"2014-07-07";d:1349;s:10:"2014-07-08";d:1290;s:10:"2014-07-09";d:1324;s:10:"2014-07-10";d:1304;s:10:"2014-07-11";d:1106;s:10:"2014-07-12";d:661;s:10:"2014-07-13";d:757;s:10:"2014-07-14";d:1318;s:10:"2014-07-15";d:1261;s:10:"2014-07-16";d:1353;s:10:"2014-07-17";d:1189;s:10:"2014-07-18";d:1036;s:10:"2014-07-19";d:685;s:10:"2014-07-20";d:771;s:10:"2014-07-21";d:1311;s:10:"2014-07-22";d:1209;s:10:"2014-07-23";d:510;}

    which looks like pairs of dates and numbers. I might expect our WP website domain to be listed in there.

    The next call in the access log is:

    https://statistics.library.dmu.ac.uk/Piwik/?module=API&method=SitesManager.getJavascriptTag&idSite=1&period=&date=&filter_limit=&token_auth=changedtoprotecttheinnocent&expanded=&format=PHP&mergeSubdomains=1&mergeAliasUrls=1&url=https%3A%2F%2Fourdev.dmu.ac.uk

    which has “idSite=1”. This returns Piwik JS for the first website and not, in this case, the 15th.

    Is this a configuration issue or related to versions?

    Best regards.

    https://wordpress.org/plugins/wp-piwik/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter c3iq

    (@c3iq)

    An update. Piwik needs websites listed in Websites Management. It seems so far that *.somedomain.com doesn’t work. The test for this is:

    https://statistics.library.dmu.ac.uk/Piwik/?module=API&method=SitesManager.getSitesIdFromSiteUrl&format=PHP&token_auth=changedtoprotecttheinnocent&url=http%3A%2F%2Ffulup.ourdev.dmu.ac.uk

    Not listed:

    a:0:{}

    listed:

    a:1:{i:0;a:1:{s:6:"idsite";s:2:"15";}}

    I don’t know yet if Piwik/WP-Piwik can sort out the difference between the different subdomains.

    Thread Starter c3iq

    (@c3iq)

    I have come up with this…

    I believe that I can’t combine one site in Piwik and multiple blogs in WP using WP-Piwik so that individual users can see their own stats.

    With that in mind I don’t want to use our usual Piwik instance because I would be adding 700+ “websites” to the handful we have.

    I have created a new instance of Piwik just for this service (got to love open source). I wrote a script which gets domains for every blog, creates a site in Piwik and gives view rights to a user in Piwik who doesn’t have superadmin or admin rights.

    As soon as a user clicks on WP-Piwik in their dashboard the two, blog and website in Piwik, get linked together.

    I just need some stats now to prove this works.

    Plugin Author braekling

    (@braekling)

    WP-Piwik uses the Piwik API and the blog’s URL to get the blog’s Piwik ID. So if you want to track different domains as one Piwik site, you have to (as you mentioned) add all these domains to the specific site.

    If you are talking about subdomains (*.common.domain) and a WP multisite, you can also try this:

    – Configure WP-Piwik as a simple plugin and disable auto-determine. Choose your “combined tracking site”.
    – Enable “track across subdomains”, http://wordpress.org/support/topic/track-across-subdomains-wp-on-subdomain

    I’m trying to accomplish the same thing, manage all the site like one in a wordpress multisite environment, without having enable one by one. I guess if the option auto-determine was available in the plugin network configuration this can be done.

    Is this possible or there is another way to doing that?

    Plugin Author braekling

    (@braekling)

    Allowing the users of a network to disable auto determination means, that every user is allowed to choose another user’s site. I don’t think this is intended?

    Did you also try to update to the latest version of Piwik? c3iq is using 2.2.2, the required version is 2.7.0 or higher.

    Sorry if I don’t explain myself too well. I want to use Piwik in a wordpress multisite environment but it would be nice for my particular needs that all blogs’s statics will be merged in the main site’s statics, just like if they were the same site.

    My apologies if this is not the right place to ask this, perhaps this should be a new post.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Default site 1 for all blogs in a multisite’ is closed to new replies.