piwik.js not working

Posted by gligoran 

Advanced
gligoran [ # ]
June 10, 2012 11:27PM
Hi!

I've recently noticed that Piwik stopped tracking all of my sites. Some had WP-Piwik plugin, but others (non-WP sites) had the javascript code. After investigating a bit I came to realize there's a common reason. Piwik stopped working it the url parameter of the GET request has http:// in the start.

For example I get this error in Chrome console:

GET http://piwik.gligoran.com/piwik.php?action_name=Goran%20Gligorin&idsite=3&rec=1&r=982635&h=23&m=5&s=37&url=http%3A%2F%2Fwww.gorangligorin.com%2F&_id=/../&res=1920x1200 403 (Forbidden)


I've removed a part of the link for security, but it has the important parts (if not, say so and I'll provide more data).

Anyway, if I put this entire link into the browser I get the 403 error, but if I remove the http%3A%2F%2F (which is http:// in unencoded form), the request goes through successfully. This same reason caused WP-Piwik to malfunction, but there I was able to fix it on the plugin side. I can do this for the JavaScript tracking code, as the error appears to be somewhere deep in the code.

Please fix this as soon as possible, so I can track my non-wordpress sites normally. To get this fixed ASAP, I would ask you to post where and how in the code I can correct this myself, so I don't have to wait for the next release.

Thank you,
gligoran
matt [ # ]
June 11, 2012 09:58AM
you need to ask your webhost to disable mod_security




Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. I'm on twitter & on github


gligoran [ # ]
June 11, 2012 11:13AM
Hi,

thanks for the quick response. Any idea how I can do this on a HostGator shared hosting?

Bye,
gligoran
matt [ # ]
June 11, 2012 12:54PM
Contact the hostgator team they will help you for sure smiling smiley




Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. I'm on twitter & on github


simitar [ # ]
January 01, 2014 04:38PM
I got this problem actually solved by asking my host for a solution. They do just whitelisted my domain with:

An reoccurring mod_sec rule being hit and have whitelisted the domain for mod_sec rule 1234234

Happy New Year
Sorry, only registered users may post in this forum.

Click here to login

Free Forum support is provided by the Piwik Community. If you require any urgent or professional help, contact Piwik Professional Services team!