• Resolved OneWordPresser

    (@onewordpresser)


    Hey Andre,

    Installed the plugin in a new (single installation) site. It added the code and it appears on my Piwik, but it doesn’t look like it’s getting data.

    I get a page saying:

    “No data has been recorded yet

    No analytics data has been tracked for this website yet. Please set up the JavaScript tracking code on your website and refresh the page.”

    I am getting visits, since I’m also tracking with jetpack.

    Code seems to match.

    Any steps I can take to solve this? Thank you! ??

    https://www.ads-software.com/plugins/wp-piwik/

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

    (@braekling)

    How many visits are tracked by jetpack?

    Maybe this visitors disabled Piwik tracking, use JS blockers or are bots? Or are these visits your own visits, which are tracked by Jetpack and filtered by WP-Piwik?

    The tracking code is shown and valid? So I don’t think this is an issue caused by WP-Piwik.

    You can use the visitor log to get some live details about Piwik’s tracking, as shown here:
    https://demo.piwik.org/index.php?module=CoreHome&action=index&idSite=7&period=day&date=yesterday#/module=Live&action=indexVisitorLog&idSite=7&period=day&date=yesterday

    Thread Starter OneWordPresser

    (@onewordpresser)

    Hi Andre, thanks for your prompt answer! ??

    Jetpack tracked 165 visits today. Piwik still shows this page:

    View post on imgur.com

    Here’s the code as it show on the website:

    View post on imgur.com

    I can’t see the visitor logs on piwik because it’s not tracking at all.

    Any ideas?

    Thank you for your time ??

    Plugin Author braekling

    (@braekling)

    Can you try to use another tracking code type (e.g., js/index.php) – just to be sure it’s not caused by the WP-Piwik proxy code.

    Does the Piwik URL you configured fit the trusted host configured in Piwik itself? See https://piwik.org/faq/troubleshooting/faq_171/

    Thank you!

    Thread Starter OneWordPresser

    (@onewordpresser)

    It did start tracking when I changed it to js/index.php
    However, with that option my piwik installation url shows in the code.

    Under “Trusted Piwik Hostname” it shows 2 domains. The fisrt one is the domain where pikiw is installed, the second one is the domain of the first website I added to be tracked. Do all of the tracked domains need to show there?

    Thank you Andre

    Thread Starter OneWordPresser

    (@onewordpresser)

    Oh! And congrats on adding the btc qr code on your tip widget! ??

    Plugin Author braekling

    (@braekling)

    Ok, can you please try to open the Proxy script manually?
    http[S]://example.com/wp-content/plugins/wp-piwik/piwik.php

    Is a complete JavaScript code shown? It should end like this:

    /*! @license-end */
    };

    The trusted hostname should be ok if the Piwik URL is added there (the URL you also entered as Piwik URL in WP-Piwik’s settings).

    Thread Starter OneWordPresser

    (@onewordpresser)

    This is the code that’s showing

    <br />
    <b>Warning</b>:  file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in <b>/home/rootdomain/public_html/trackeddomain.com/wp-content/plugins/wp-piwik/piwik.php</b> on line <b>105</b><br />
    <br />
    <b>Warning</b>:  file_get_contents(https://mypiwikdomain.com/piwik/piwik.js) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: no suitable wrapper could be found in <b>/home/rootdomain/public_html/trackeddomain.com/wp-content/plugins/wp-piwik/piwik.php</b> on line <b>105</b><br />

    The trusted host name does show the domain under which Piwik is installed. But it also shows a second domain, the one for the first site I tracked. Should I remove this second domain from there? Or should I add all the other domains I want to track?

    Thank you Andre!

    Plugin Author braekling

    (@braekling)

    The warnings give the answer:

    https:// wrapper is disabled in the server configuration by allow_url_fopen=0

    The Piwik proxy script uses file_get_contents with https://. You have to enable this to use the proxy script: Set allow_url_fopen=1 in php.ini. (WP-Piwik supports cURL, but the Piwik proxy script doesn’t.)

    Thread Starter OneWordPresser

    (@onewordpresser)

    This is what my hosting support told me:

    Generally, we do not recommend making this change as a large number of code injection vulnerabilities reported in PHP-based web applications are caused by the combination of enabling allow_url_fopen and bad input filtering.

    A friend has a shared account with this same hosting service, and it worked fine on his.

    Should I try installing piwik in a different hosting server?

    Thread Starter OneWordPresser

    (@onewordpresser)

    Oh, but wait.

    Why is it working on the first website I added? It’s hosted on the same server.

    Plugin Author braekling

    (@braekling)

    Hm, strange. Maybe you enabled “allow_url_open” in your .htaccess file?

    Anyway: I will check if I can extend Piwik’s proxy code by cURL, so this problem should be solved.

    Happy Easter holidays!

    Thread Starter OneWordPresser

    (@onewordpresser)

    I haven’t modified the .htaccess file.

    Looking forward to it mate. Happy holidays to you too! ??

    Plugin Author braekling

    (@braekling)

    Updated proxy script & added cURL support.

    -> 0.9.9.17.

    Thread Starter OneWordPresser

    (@onewordpresser)

    Now when I go to

    http[S]://example.com/wp-content/plugins/wp-piwik/piwik.php

    I get:

    Fatal error: Cannot redeclare file_get_contents_curl() (previously declared in /home/root/public_html/Domain.com/wp-content/plugins/wp-piwik/piwik.php:63) in /home/root/public_html/Domain.com/wp-content/themes/premiere/functions/admin-functions.php on line 1432

    :/

    Plugin Author braekling

    (@braekling)

    Argh, okay – your theme defines a function with the same name. :-/

    That’s a unhappy coincidence. So I will change this to something WP-Piwik specific.

    Hotfix: just search and replace file_get_contents_curl in wp-piwik/piwik.php – e.g., replace by piwik_file_get_contents_curl.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘No data has been recorded yet’ is closed to new replies.