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

    (@braekling)

    Actually the proxy mode works fine, so I need some more information about your configuration and what “does not work” means in fact to get behind your issue.

    Is the tracking code not shown? Is the proxy script not accessible? Is the script added as expected, but Piwik does not count? …

    Thread Starter chelovek

    (@chelovek)

    Oh, sorry. Code is added on auto. I see it in source, but it doesn`t send any stats to piwik.

    Plugin Author braekling

    (@braekling)

    And the code is added as expected?

    Does YOUR_DOMAIN/wp-content/plugins/wp-piwik/piwik.php show the tracking client code?

    Do the other tracking modes work?

    Thread Starter chelovek

    (@chelovek)

    Yep:

    <!-- Piwik -->
    <script type="text/javascript">
      var _paq = _paq || [];
      _paq.push(['trackPageView']);
      _paq.push(['enableLinkTracking']);
      (function() {
        var u=(("https:" == document.location.protocol) ? "https" : "http") + "://MYDOMAIN.COM/wp-content/plugins/wp-piwik/";
        _paq.push(['setTrackerUrl', u+'piwik.php']);
        _paq.push(['setSiteId', 2]);
        var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
        g.defer=true; g.async=true; g.src=u+'piwik.php'; s.parentNode.insertBefore(g,s);
      })();
    </script>
    <!-- End Piwik Code -->

    When I navigate to wp-content/plugins/wp-piwik/piwik.php, I see GIF Image 1×1 in center.

    I tried Default tracking, but seems, that it doesn`t send data to main PIWIK, I can see that data in WP-PIWIK only.

    Plugin Author braekling

    (@braekling)

    WP-Piwik just gets the tracking code using Piwik API, does some changes (if necessary) and adds it to your blog. Furthermore, WP-Piwik gets analytics data from Piwik and shows it inside the WordPress dashboard.

    WP-Piwik neither tracks by itself nor stores tracking data… if values are shown in WP-Piwik, they have to be available in Piwik, too. Maybe you should check your date settings in Piwik? By default it does not show today’s data.

    If you open the proxy PHP script, you should get a JavaScript code, e.g., see
    https://www.braekling.de/wp-content/plugins/wp-piwik/piwik.php

    Thread Starter chelovek

    (@chelovek)

    Ok, I see. I have set Piwik to show today by default.

    First tracking option works fine, without any problems, but I need to use piwik.php proxy.

    Here is what I see in my browser Tab, when I try to load piwik.php (wp-content/plugins/wp-piwik/piwik.php):
    http://oi59.tinypic.com/21o6joj.jpg

    I tried another thing to check, if this problem is not caused by server:
    I uplodaded piwik.php script from developers to root domain, configured it. Then I added javascript code to my page footer with main piwik details and it worked, Piwik shows stats.

    I am trying to figure out, what`s blocking that connection between your plugin proxy and piwik analytic. All I done, is ticked box to Use proxy script and add javascript to footer. And why when I navigate to piwik.php I see gif… Mystic for me. Maybe I need to edit some permissions through ftp? Any Ideas?

    Plugin Author braekling

    (@braekling)

    Hm, can you check your .htaccess files in your WordPress folder, your wp-content folder and your wp-content/plugins folder?

    Meanwhile, I will check if the piwik.php script may cause this issue on his own (e.g., by delivering a gif header or something similar…).

    Thread Starter chelovek

    (@chelovek)

    WordPress htaccess
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    There is none htaccess in plugin folder and wp-content.

    Here are the permissions: 0755 for wp-content and plugins. For piwik.php located in wp-piwik folder is 0644.

    Plugin Author braekling

    (@braekling)

    Can you give me the response header of piwik.php?

    If you don’t know how to get it using your browser, try a tool like http://tools.seobook.com/server-header-checker/ – just enter the full URL of piwik.php, click “Check Headers” and copy the result.

    Thread Starter chelovek

    (@chelovek)

    Ok, here is the result:

    SERVER RESPONSE: HTTP/1.1 200 OK
    Date:
        Sun, 22 Jun 2014 15:51:49 GMT
    Server:
        LiteSpeed
    Connection:
        Keep-Alive
    Keep-Alive:
        timeout=5, max=100
    X-Powered-By:
        PHP/5.3.28
    Set-Cookie:
        popover_view_4721c91e4074095d276cfbb7ed556ae5=1; expires=Thu, 04-Jun-2015 21:11:49 GMT; path=/
    Cache-Control:
        public, max-age=604800
    Expires:
        Sun, 29 Jun 2014 15:51:49 GMT
    Content-Type:
        image/gif
    Vary:
        User-Agent

    Plugin Author braekling

    (@braekling)

    Ok, thank you. Two more questions: Are you using WP-Piwik in network mode? And are you using the REST or the PHP API?

    Thread Starter chelovek

    (@chelovek)

    I am using REST MODE. Could you please explain more about ” Are you using WP-Piwik in network mode? “? Didn`t understand.

    Plugin Author braekling

    (@braekling)

    Are you using WordPress in network mode (one WordPress setup for many blogs, http://codex.wordpress.org/Create_A_Network ) or are you using just a simple WordPress?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Piwik proxy script doesn`t work’ is closed to new replies.