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:
authormattpiwik <matthieu.aubry@gmail.com>2011-01-19 07:24:49 +0300
committermattpiwik <matthieu.aubry@gmail.com>2011-01-19 07:24:49 +0300
commit1afa106695c16ed20888419a67e7812ef77bbd0c (patch)
tree6dbd9b3e7718685b2fffbe535fee213616baeb30 /plugins/CustomVariables/Controller.php
parenta852b0e89b05ba9bc184586fba0fe242d0cf4f79 (diff)
Refs #1984 - New plugins CustomVariables
* Now possible to track up to 5 Custom variables per Visit. Also, Goal conversions will be reported 'By custom variable name & value' * New report in Visitors > Custom Variables, new CustomVars API * Updated schema * Updated PiwikTracker PHP api to allow setting the name,value pairs Code style * Refatoring some API code, and Archiving queries * Changing text from 'segment' to 'dimension' as this is better description + we want to build actual segmentation later * removing getJs calls in some plugins since they only included sparkline.js, moved to CoreHome git-svn-id: http://dev.piwik.org/svn/trunk@3780 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/CustomVariables/Controller.php')
-rw-r--r--plugins/CustomVariables/Controller.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/CustomVariables/Controller.php b/plugins/CustomVariables/Controller.php
new file mode 100644
index 0000000000..182410d6bd
--- /dev/null
+++ b/plugins/CustomVariables/Controller.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ * @version $Id$
+ *
+ * @category Piwik_Plugins
+ * @package Piwik_CustomVariables
+ */
+
+/**
+ *
+ * @package Piwik_CustomVariables
+ */
+class Piwik_CustomVariables_Controller extends Piwik_Controller
+{
+ /**
+ * CustomVariables
+ */
+ function getVisitCustomVariables($fetch = false)
+ {
+ $view = Piwik_ViewDataTable::factory();
+ $view->init( $this->pluginName, __FUNCTION__, "CustomVariables.getCustomVariables", "getCustomVariablesValuesFromNameId" );
+
+ $this->setPeriodVariablesView($view);
+ $view->enableShowGoals();
+
+ $view->setColumnsToDisplay( array('label','nb_visits') );
+ $view->setColumnTranslation('label', Piwik_Translate('CustomVariables_ColumnCustomVariableName'));
+ $view->setSortedColumn( 'nb_visits' );
+ $view->setLimit( 10 );
+ return $this->renderView($view, $fetch);
+ }
+
+ function getCustomVariablesValuesFromNameId( $fetch = false)
+ {
+ $view = Piwik_ViewDataTable::factory();
+ $view->init( $this->pluginName, __FUNCTION__, 'CustomVariables.getCustomVariablesValuesFromNameId' );
+
+ $view->disableSearchBox();
+ $view->disableExcludeLowPopulation();
+ $view->setColumnsToDisplay( array('label','nb_visits') );
+ $view->setColumnTranslation('label', Piwik_Translate('CustomVariables_ColumnCustomVariableValue'));
+
+ return $this->renderView($view, $fetch);
+ }
+
+}
+