Support » Plugin: WP-Piwik » [Plugin: WP-Piwik] settings and statistics in wp-piwik not working

  • I have to admit I’m a little baffled. I have Piwik and WP-Piwik running on three WordPress installations. One Installation shows some strange behaviour. I don’t know what matters, so I’ll just write down everything I can think of.
    It’s a multisite installation with different four sites on three different domains. On the main blog WP-Piwik works fine. Today we noticed that on and on the statistics don’t work and the settings page shows the error

    An error occured: Please check URL and auth token. You need at least view access to one site.

    Funny thing is, the plugin is actually working, the visitors of both sites are tracked by Piwik (and there is no manual tracking code), it’s just the admin area that’s messed up.
    The token and the URL are identical to the installation, where it works fine. The token is from the admin account (not recommended, I know, it was set up in a hurry).
    While trying to debug it we actived the plugin for a fourth site, which wasn’t tracked yet. We entered the same URL and token, checked “auto-configuration” and hit save. The site was created in Piwik, and the plugin works there as well. On a side note, while both non-working sites are on different domains, this particular site is a subdirectory of the main blog (
    I tried disabling and enabling the plugin, uninstalled and reinstalled it, hoping that it would clean it’s database entried, but to no avail.
    I even added a new user on Piwik and used his token, but here again no change.

    Used versions: WordPress 3.3.1, Piwik 1.7.1, WP-Piwik 0.9.1

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author braekling


    Are you using WP-Piwik as a “Network Activated” or as a “Site Specific Plugin”? If you network-activated WP-Piwik, you should not get an auto-config checkbox. In this case: are you using the “Proper Network Activation Plugin”? This will mess up WP-Piwik’s settings.

    If the issue occured after changing a part of your setup (e.g. after updating WP-Piwik), can you try to remove all settings according to WP-Piwik from your database? After a reconfiguration it should work fine again.

    How to delete WP-Piwik’s settings: (see last post)

    The plugin is configured site-specific. I have to assume it happened after a plugin update since we rather look directly at Piwik for the stats and it was counting fine.

    For now we got it working again by pointing the url of the piwik installation to instead of, which happens to be the same installation.

    Plugin Author braekling


    Can you try to run the test script described here?

    Maybe it’ll give a hint why you can’t connect to Piwik using different domains.

    I also have this problem. When I enter the token and all I only get a table with: value

    Nothing else. Any idea of how to fix this?

    Same problem – Piwik 1.7.1, WP 3.3.1, WP-Piwik 0.9.1 and only on one of my blogs (not on MU).


    The above URL gives only “value” table with numbers from 2-34 (probably the number of sites).

    Plugin Author braekling


    Did you also try the second URL to get the blog’s URL by id? Did it work?

    Did you try to use WP-Piwik without auto-config?

    What’s about the test script’s result mentioned above? See

    Plugin Author braekling


    One more question: Is Piwik running on another domain than your blog? Because you told your issue is like GeraldS’ problem?

    1. Don’t understand what exactly you mean.

    2. Yes and it gives the same error.

    3. Will do.

    4. Piwik is on another domain, yes.

    I just noticed that my problem is not exactly the same then, as I am running both Piwik and site on the same server. Anyway something seems to blog the Piwik API as i got this from the test script for both cases:

    <!DOCTYPE html>
    <html lang=”en”>
    <title>Access Restricted</title>
    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″/>
    <meta http-equiv=”Content-Language” content=”en-us”/>
    <!–[if lte IE 8]>
    <meta http-equiv=”X-UA-Compatible” content=”chrome=1″>
    <!–[if IE 7]>
    <meta http-equiv=”X-UA-Compatible” content=”IE=8″ />
    <style type=”text/css”>body,html{display:block;position:relative;margin:0;padding:0;width:100%;height:100%;overflow:hidden;}iframe{display:block;position:relative;margin:0;padding:0;width:100%;height:100%;}</style>
    <iframe frameborder=”0″ width=”100%” height=”100%” src=””></iframe>
    <script type=”text/javascript”>
    (function(w, d) {
    w.refresh = function() { w.location.href = ‘/piwik/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth=myauthkey’; };
    })(window, window.document);

    Seems like cloudflare might be blocking it. I’ll try turning it off…

    Plugin Author braekling



    1. You tried the getSitesWithAtLeastViewAccess method, but not the getSitesIdFromSiteUrl method. Both are described here:

    3. Ok… maybe it’s a similar problem to phonejoy’s issue.


    Yes, looks like a blocking issue. WP-Piwik is not able to solve this captcha 😉

    1. When running the Piwik test script I get empty results (it shows nothing). Does it have to be run from the server where Piwik is?

    And let me again mention that I have many other blogs running completely OK with this plugin and on different servers.

    Plugin Author braekling


    The script has to be run from your WordPress installation’s server. It creates API calls as WP-Piwik does. The result should be like this:

    		<title>WP-Piwik - Piwik API call test script</title>
    	<body style="font-family:Arial;">
    	<h1>WP-Piwik - Piwik API call test script</h1>
    	<h2>Test 1/2': ...
    	<p>Call: ....&token_auth= + TOKEN
    	<pre tyle="background:#ccc">--- SOME INTERESTING RESULTS HERE --
    	<p><small>Time: x.xxs</small></p>
    	<h2>Test 2/2': ...
    	<p>Call: ....&token_auth= + TOKEN
    	<pre tyle="background:#ccc">--- MORE INTERESTING RESULTS HERE --
    	<p><small>Time: x.xxs</small></p>

    Of course it has to run as PHP script.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: WP-Piwik] settings and statistics in wp-piwik not working’ is closed to new replies.