0

I had a working wp-piwik plugin. Its configuration looked like this: enter image description here

It worked fine. Then I moved the piwik installation to a different location (so I can track more sites).

enter image description here

Now wp-piwik only recognizes the auth key if we're not using a /home... path, but http://analytics... path. And unfortunately it doesn't work - no tracking occurs.

If I give a wrong URL, it sees it's wrong. If I supply a wrong auth token, it sees it's wrong. So somehow the plugin communicates with piwik. If I supply piwik location as a /home/piwik/, it doesn't work, and I'm pretty sure it used to work before I updated from 2.3.0 to 2.7.0.

My site works fine with the tracking code. But that is visible in the browser and I don't like that. I don't want the tracking to depend on the user's browser. I don't want the client to know that there's tracking.

If there's manual php code inclusion that I can use. I'd use it, but i'm not very good with php.

The option "Piwik path (PHP API, beta):" works only if I remove the auth token but also doesn't track. the piwik path can only be /home/piwik....

Here's what Support --> "Run test script" gives me:

*** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
Using: cURL
SSL peer verification: enabled
User Agent: 
Call: /home/user/piwik_location/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
Result:

Time: 0s

*** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
Using: cURL
SSL peer verification: enabled
User Agent: 
Call: /home/user/piwik_location/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fsite.com&format=XML&token_auth= + TOKEN
Result:

Time: 0s

Any suggestions?

mist
  • 1,853
  • 2
  • 19
  • 33

1 Answers1

0

You also have to update the trusted hostname if you move Piwik: http://piwik.org/faq/troubleshooting/faq_171/

If this does not help, check WP-Piwik's debug script output (see support tab in settings menu).

UPDATE: As discussed here (https://wordpress.org/support/topic/wp-piwik-recognizes-the-key-but-doesnt-track-with-piwik-url-or-piwik-path?replies=7), the plugin's behavior is as expected. The test script output above shows the wrong value for Piwik URL (it contains the path instead). If entering the Piwik URL and enabling the tracking script, the tracking works.

André
  • 477
  • 3
  • 11
  • I'm not getting any warnings, in the config page, I have Piwik is installed at: -->Valid Piwik Hostname: my.correct.url. So I don't think this is the problem – mist Mar 29 '15 at 22:52