I have a wordpress site using Cloudflare, when using Piwik more than half the visits are not counted. I tried disabling Cloudflare and then the visits were counted correctly. Then I enabled it again and visits dropped immediately. GA and GetClicky counts fine either way. I have this in the config.ini.php file:
I changed the order and even installed the piwik wordpress plugin and also tried turning security off in cloudflare but that didn’t make a difference.
But I found a solution. First was adding data-cfasync=“false” to the tracker code in the script tag, like:
<script data-cfasync="false" type="text/javascript" ... (twice in the code)
Then adding a page rule with everything off for the directory where piwik is installed. In my case that was: *domain.com/analytics*
http://i.imgur.com/96YTA.jpg
Now it's working fine. :)