Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-20 10:39:09 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-20 10:39:09 +0300
commit1f0bbb8eb1e9759c6dc6ccf18c45054c905208fc (patch)
tree95df9f49750fadf00f67b995c7ed240acebdab43 /plugins/SitesManager/SitesManager.php
parent4368c9785cd64515cb5bc79ff4c87de58e168d6c (diff)
- fixed #9 referer URLs with host registered as main_url or alias_url should NOT be counted as referer
now if a visitor comes to piwik.org/ with a piwik.org/xx/y/z referer, it will be considered a direct entry rather than a referer visit. makes use of the new caching mechanism introduced with the Goal Tracking plugin, to cache website-related data for super fast access at Tracker time. - Goals is not a tracker plugin anymore (improving performance of Tracker) - fixed bug that the cache file wasn't read properly and goal queries were done at each piwik.php request
Diffstat (limited to 'plugins/SitesManager/SitesManager.php')
-rw-r--r--plugins/SitesManager/SitesManager.php26
1 files changed, 25 insertions, 1 deletions
diff --git a/plugins/SitesManager/SitesManager.php b/plugins/SitesManager/SitesManager.php
index fe09980913..1fcd1364ce 100644
--- a/plugins/SitesManager/SitesManager.php
+++ b/plugins/SitesManager/SitesManager.php
@@ -29,7 +29,31 @@ class Piwik_SitesManager extends Piwik_Plugin
function getListHooksRegistered()
{
- return array('AdminMenu.add' => 'addMenu');
+ return array(
+ 'AdminMenu.add' => 'addMenu',
+ 'Common.fetchWebsiteAttributes' => 'recordWebsiteHostsInCache',
+ );
+ }
+
+ function recordWebsiteHostsInCache($notification)
+ {
+ require_once "SitesManager/API.php";
+ $info = $notification->getNotificationInfo();
+ $idsite = $info['idsite'];
+
+ // add the 'hosts' entry in the website array
+ $array =& $notification->getNotificationObject();
+ $urls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite);
+ $hosts = array();
+ foreach($urls as $url)
+ {
+ $url = parse_url($url);
+ if(isset($url['host']))
+ {
+ $hosts[] = $url['host'];
+ }
+ }
+ $array['hosts'] = $hosts;
}
function addMenu()