skorv
Forum Replies Created
-
braekling, thank you very much for this feedback.
Almost all is working;
Piwik – Hostgator issue
Here is a tip to anyone trying to use Piwik/WP-piwik with Hostgator. First, as stated in the first post of this thread, I tried to convince Hostgator by referring to the test script of WP-piwik that things where not working right and that they were to “blame”. They persisted in saying they could not see anything wrong.Now, here is what I did: I set up a new test directory at my Hostgator account and populated it with two scripts: test/test-get.html and test/test-post.html. The get script included the piwik tracker as automatically reported by Piwik and the post script contained the piwik tracker with an extra POST entry, like so:
… var _paq = _paq || [];
_paq.push([‘setRequestMethod’, ‘POST’]);
…In this way Hostgator could themselves see that hitting the POST script got through and hitting the GET script did not get through. This made them actually fix the issue.
So, now when I do the test scripts in WP-Piwik, both of them deliver a result OK status message.
I also changed the Php.php to set it to use serialisation as in the link
https://ww.wp.xz.cn/support/topic/not-getting-the-site-id-wp-piwik-error-tracking-code-not-availbale?replies=7 you suggested.Now also the error when entering the piwik url and authtoken in WP-piwik went away.
However, changing the PHP.php in this way messes up my vistor map in the dashboard in piwik itself, citing alot of yellow error codes, so I actually reverted to the previous php.php.
Anyway, hope this could be useful to people using WP-piwik/Piwik.
Best regards
Tor
Hi braekling,
Many thanks for your answer.
After an extended chat with Hostgator,it seems that the above is not somehow the issue. According to Hostgator what is to blame is the WP-Piwik plugin forming malformed calls.
They say that when checking the mod_sec logs there are no hits and that the wp-piwik plugin makes a mal formed call in the test2 case.
Here are my calls:
test1, which works:
https://xxxx.hostgator.com/xxxx/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKENtest2, which fails with a 403 response:
https://xxxx.hostgator.com/xxxx/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fmysite.com%2Fsv&format=XML&token_auth= + TOKENSo according to hostgator, the last call has a malformed url and that is the problem.
Do you agree? What can I do?
Greatful for any insight on what is happening.
Best regards,
Tor