• Thanks for a great plugin which makes using Piwik so easy.

    Is it possible for you to add the alternative code from this page
    http://www.statstory.com/how-to-avoid-bots-when-using-image-tracking-in-piwik-analytics/ to the no script section as an option?

    <noscript>
    <?php
    if (preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'])) {
    //do not fire tracker
    }
      else {?>
    <!-- Piwik Image Tracker -->
    <img src="http://localhost/piwik/piwik.php?&idsite=1&rec=1&urlref&_cvar={&quot;5&quot;:[&quot;Non Bot&quot;,&quot;No Javascript&quot;]}" style="border:0" alt="" />
    <!-- End Piwik -->
     <?php }?>
    </noscript>

    Ideally it should use the correct url as the existing code does now.

    By the way I am using the plugin with the 2.0-b2 version of Piwik and it seems to be working fine. 🙂

    http://ww.wp.xz.cn/plugins/wp-piwik/

Viewing 1 replies (of 1 total)
  • Plugin Author braekling

    (@braekling)

    You talk about the USER_AGENT filter not about the IMG tag, don’t you?

    Piwik should be able to filter bots on its own, but of course it should be no problem to add this functionality. But I’m can’t promise to add it to the next release… there are some other high prio tasks to solve first 😉

Viewing 1 replies (of 1 total)

The topic ‘Alternative javascript free tracking code’ is closed to new replies.