The statistics report referrer is trying to remove local referrers by using NOT LIKE '%%%s%%' resulting in removal of statistics from external sources that uses the target in the url. That includes for example facebook and the new google-url standard. Filtering out google seems a bad idea.

Google for example uses "&url=http%3A%2F%2Fwww.exampledomain.com" in the url.

One way to fix this is to change rows 120>> in statistics.admin.inc

  $query .= tablesort_sql($header);
  $result = pager_query($query, 30, 0, $query_cnt, $_SERVER['HTTP_HOST']);

  $rows = array();

to

  $query .= tablesort_sql($header);
  $server_url = "http://" . $_SERVER['HTTP_HOST'];
  $result = pager_query($query, 30, 0, $query_cnt, $server_url);

  $rows = array();

Perhaps its not a final solution since the "http://" is accepted in the url even thoug sites like google or facebook dont use them.

Comments

DJ C’s picture

Version: 6.19 » 7.9

this is still true for core 7.10 and very annoying, as it filters a lot of valid referrers like google and many others

I would further suggest to not filter empty referrers as this might be a valuable information for quite some webmasters as well

as quick fix you can, in statistics_top_referrers(), modify to
->condition('url', '%' . $_SERVER['HTTP_HOST'] . '/%', 'NOT LIKE')
and remove
->condition('url', '', '<>')
however this will not fully fix the thing as
a referrer like 'http://referrer.tld/yourdomain.tld/link.html' will still get filtered out
and the empty referrer wont be displayed as empty but as 'admin/reports/referrers'
but its a start ;)

Version: 7.9 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.