After reading through Stephan Miller's Piwik Web Analytics Essentials, it seems there are three categories of non javascript tracking: Simple Image Tracking, Advanced Image tracking, and PHP Tracking API. From what I can see, it is possible to get the referer using advanced image tracking. However, his book says the parameter is "url_ref" not "urlref", and that "you will have to use PHP to set this value. In PHP this value
is accessible with $_SERVER['HTTP_REFERRER']." Changing "&" to "&", my best guess is now:
is accessible with $_SERVER['HTTP_REFERRER']." Changing "&" to "&", my best guess is now:
<?php if (preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'])) { //do not fire tracker } else {?> <!-- Piwik Image Tracker --> <img src="http://example.com/piwik/piwik.php?idsite=1&rec=1&action_name=example.com&url_ref=$_SERVER['HTTP_REFERER']" style="border:0" alt="" /> <!-- End Piwik Image Tracker --> <?php }?>