Several customers have asked about getting Piwik analytics working correctly while we have mod_security enabled. We try to be as aggressive as possible against the spammers and hackers of the world, and that’s why we run mod_security, but we don’t like that to hinder your ability to use some of the great web scripts out there when possible.
If your Piwik is hosted on the same domain as your website being tracked, you can edit your Piwik Javascript Tracking code to force data to be sent in POST, to avoid the mod_security check. Before the line:
piwikTracker.trackPageView();
you can add the following line
piwikTracker.setRequestMethod('POST');
Additional information can be found at Piwik’s website. If you run into issues, don’t hesitate to open a support ticket from within your client management area. Our technicians are standing by to assist you with your account.
Leave a Reply