From 02445ddda8dfabdc2648f4e8978ff84eb62b1733 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 27 Nov 2011 09:02:15 +0100 Subject: Fix 'pages' stats (missed internal referred pages). --- utils/modules/sitestats.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/utils/modules/sitestats.php b/utils/modules/sitestats.php index 693fba3..bc4a813 100644 --- a/utils/modules/sitestats.php +++ b/utils/modules/sitestats.php @@ -156,33 +156,36 @@ class SiteStats { $url = preg_replace('/@/', '&', $url); // Don't show 'banned' urls. - if(strpos($url, "executionroom.com") != FALSE || - strpos($url, "google") != FALSE || + if(strpos($url, "google") != FALSE || strpos($url, "bing") != FALSE || strpos($url, "viagra") != FALSE || strpos($url, "inthesetimes.com") != FALSE || strpos($url, "prescription") != FALSE || $url == "") continue; + if($entry->page != "") $this->pages[$entry->page]++; + + // Don't track internal referral + if(strpos($url, "executionroom.com") != FALSE) + continue; + if(strpos($url, "youtube.com") != FALSE) { $u = parse_url($url); parse_str($u['query']); if($v != "") { //print_r($u['query']); $youtubeurl = "http://www.youtube.com/watch?v=".$v; - $this->referers[$youtubeurl]++; - continue; + $url = $youtubeurl;//$this->referers[$youtubeurl]++; + // continue; } - } - + } else // If url exists already without www remove www from this url. if(substr($url, 7, 3) == "www") { $surl = "http://" . substr($url, 11); if($this->referers[$surl]) $url = $surl; } + $this->referers[$url]++; - - if($entry->page != "") $this->pages[$entry->page]++; } arsort($this->referers); -- cgit v1.2.3