Пример #1
0
 function addWidgets()
 {
     Piwik_AddWidget('General_Visitors', 'VisitorInterest_WidgetLengths', 'VisitorInterest', 'getNumberOfVisitsPerVisitDuration');
     Piwik_AddWidget('General_Visitors', 'VisitorInterest_WidgetPages', 'VisitorInterest', 'getNumberOfVisitsPerPage');
     Piwik_AddWidget('General_Visitors', 'VisitorInterest_visitsByVisitCount', 'VisitorInterest', 'getNumberOfVisitsByVisitCount');
     Piwik_AddWidget('General_Visitors', 'VisitorInterest_VisitsByDaysSinceLast', 'VisitorInterest', 'getNumberOfVisitsByDaysSinceLast');
 }
Пример #2
0
 function addWidget()
 {
     $widgets = array('getDeviceMobile' => 'Mobile vs. Desktop', 'getDeviceName' => 'Devices by Model Name', 'getDeviceBrand' => 'Devices by Brand Name', 'getDeviceBrowser' => 'Mobile Browsers', 'getDeviceResolution' => 'Screen Resolutions', 'getDeviceJS' => 'JavaScript Support', 'getDeviceAJAX' => 'AJAX Support', 'getDeviceFlash' => 'Flash Support', 'getDeviceOS' => 'Operating System');
     foreach ($widgets as $method => $label) {
         Piwik_AddWidget('Mobile Analytics', $label, 'MobileAnalytics', $method);
     }
 }
Пример #3
0
 function addWidgets()
 {
     Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuPages', 'Actions', 'getPageUrls');
     Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuPageTitles', 'Actions', 'getPageTitles');
     Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuOutlinks', 'Actions', 'getOutlinks');
     Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuDownloads', 'Actions', 'getDownloads');
 }
Пример #4
0
 function addWidgets()
 {
     $widgetContinentLabel = Piwik_Translate('UserCountry_WidgetLocation') . ' (' . Piwik_Translate('UserCountry_Continent') . ')';
     $widgetCountryLabel = Piwik_Translate('UserCountry_WidgetLocation') . ' (' . Piwik_Translate('UserCountry_Country') . ')';
     Piwik_AddWidget('General_Visitors', $widgetContinentLabel, 'UserCountry', 'getContinent');
     Piwik_AddWidget('General_Visitors', $widgetCountryLabel, 'UserCountry', 'getCountry');
 }
Пример #5
0
	function postLoad()
	{
		// we register the widgets so they appear in the "Add a new widget" window in the dashboard
		// Note that the first two parameters can be either a normal string, or an index to a translation string
		Piwik_AddWidget('ExamplePlugin_exampleWidgets', 'ExamplePlugin_exampleWidget', 'ExamplePlugin', 'exampleWidget');
		Piwik_AddWidget('ExamplePlugin_exampleWidgets', 'ExamplePlugin_blogPiwikRss', 'ExamplePlugin', 'blogPiwik');
		Piwik_AddWidget('ExamplePlugin_exampleWidgets', 'ExamplePlugin_photostreamMatt', 'ExamplePlugin', 'photostreamMatt');
	}
Пример #6
0
	function addWidgets()
	{
		Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetKeywords', 'Referers', 'getKeywords');
		Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetCampaigns', 'Referers', 'getCampaigns');
		Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetExternalWebsites', 'Referers', 'getWebsites');
		Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetSearchEngines', 'Referers', 'getSearchEngines');
		Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetOverview', 'Referers', 'getRefererType');
	}
Пример #7
0
 function addWidgets()
 {
     Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetResolutions', 'UserSettings', 'getResolution');
     Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetBrowsers', 'UserSettings', 'getBrowser');
     Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetPlugins', 'UserSettings', 'getPlugin');
     Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetWidescreen', 'UserSettings', 'getWideScreen');
     Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetBrowserFamilies', 'UserSettings', 'getBrowserType');
     Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetOperatingSystems', 'UserSettings', 'getOS');
     Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetGlobalVisitors', 'UserSettings', 'getConfiguration');
 }
Пример #8
0
 /**
  * Adds Referer widgets
  */
 function addWidgets()
 {
     Piwik_AddWidget('Referers_Referers', 'Referers_WidgetKeywords', 'Referers', 'getKeywords');
     Piwik_AddWidget('Referers_Referers', 'Referers_WidgetExternalWebsites', 'Referers', 'getWebsites');
     Piwik_AddWidget('Referers_Referers', 'Referers_WidgetSearchEngines', 'Referers', 'getSearchEngines');
     Piwik_AddWidget('Referers_Referers', 'Referers_WidgetCampaigns', 'Referers', 'getCampaigns');
     Piwik_AddWidget('Referers_Referers', 'Referers_WidgetOverview', 'Referers', 'getRefererType');
     if (Piwik_Archive::isSegmentationEnabled()) {
         Piwik_AddWidget('SEO', 'Top Keywords for Page URL', 'Referers', 'getKeywordsForPage');
     }
 }
 function addWidget()
 {
     Piwik_AddWidget('General_Visitors', 'IntranetSubNetwork_WidgetIntranetSubNetwork', 'IntranetSubNetwork', 'getIntranetSubNetwork');
 }
Пример #10
0
 function addWidgets()
 {
     $idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
     // Ecommerce widgets
     $site = new Piwik_Site($idSite);
     if ($site->isEcommerceEnabled()) {
         Piwik_AddWidget('Goals_Ecommerce', 'Goals_EcommerceOverview', 'Goals', 'widgetGoalReport', array('idGoal' => Piwik_Archive::LABEL_ECOMMERCE_ORDER));
         Piwik_AddWidget('Goals_Ecommerce', 'Goals_EcommerceLog', 'Goals', 'getEcommerceLog');
         foreach ($this->ecommerceReports as $widget) {
             Piwik_AddWidget('Goals_Ecommerce', $widget[0], $widget[1], $widget[2]);
         }
     }
     // Goals widgets
     Piwik_AddWidget('Goals_Goals', 'Goals_GoalsOverview', 'Goals', 'widgetGoalsOverview');
     $goals = Piwik_Goals_API::getInstance()->getGoals($idSite);
     if (count($goals) > 0) {
         foreach ($goals as $goal) {
             Piwik_AddWidget('Goals_Goals', Piwik_Common::sanitizeInputValue($goal['name']), 'Goals', 'widgetGoalReport', array('idGoal' => $goal['idgoal']));
         }
     }
 }
Пример #11
0
{
    public function getInformation()
    {
        return array('name' => 'Example Rss Widget', 'description' => 'Example Plugin: How to create a new widget that reads a RSS feed?', 'author' => 'Piwik', 'homepage' => 'http://piwik.org/', 'version' => '0.1');
    }
    public function getListHooksRegistered()
    {
        return array('template_css_import' => 'css');
    }
    function css()
    {
        echo '<link rel="stylesheet" type="text/css" href="plugins/ExampleRssWidget/templates/styles.css" />';
    }
}
Piwik_AddWidget('Example Widgets', 'Piwik.org Blog', 'ExampleRssWidget', 'rssPiwik');
Piwik_AddWidget('Example Widgets', 'Piwik Changelog', 'ExampleRssWidget', 'rssChangelog');
class Piwik_ExampleRssWidget_Controller extends Piwik_Controller
{
    function rssPiwik()
    {
        $rss = new Piwik_ExampleRssWidget_Rss('http://feeds.feedburner.com/Piwik');
        $rss->showDescription(true);
        echo $rss->get();
    }
    function rssChangelog()
    {
        $rss = new Piwik_ExampleRssWidget_Rss('http://feeds.feedburner.com/PiwikReleases');
        $rss->setCountPosts(1);
        $rss->showDescription(false);
        $rss->showContent(true);
        echo $rss->get();
Пример #12
0
 public function addWidget()
 {
     Piwik_AddWidget('Live!', 'Live_VisitorsInRealTime', 'Live', 'widget');
 }
Пример #13
0
	public function addWidget() {
		Piwik_AddWidget('Live!', 'Live Visitors!', 'Live', 'widget');
	}
Пример #14
0
 function addWidget()
 {
     Piwik_AddWidget('General_Visitors', 'Provider_WidgetProviders', 'Provider', 'getProvider');
 }
Пример #15
0
 * @version $Id: Live.php 1420 2009-08-22 13:23:16Z vipsoft $
 * 
 * @category Piwik_Plugins
 * @package Piwik_Live
 */
/**
	TODO Live! Plugin
	====
	- api propre
	- html
	- jquery spy
	- make sure only one query is launched at once or what if requests takes more than 10s to succeed?
	- simple stats above in TEXT
	- Security review
	- blog post, push version
	
//TODO add api to get actions name/count/first/last/etc
*/
/**
 *
 * @package Piwik_Live
 */
class Piwik_Live extends Piwik_Plugin
{
    public function getInformation()
    {
        return array('name' => 'Live Visitors', 'description' => 'Live Visitors!', 'author' => 'Piwik', 'homepage' => 'http://piwik.org/', 'version' => '0.1');
    }
}
Piwik_AddWidget('Live!', 'Live Visitors!', 'Live', 'widget');
Пример #16
0
 function addWidgets()
 {
     Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuPages', 'Actions', 'getPageUrls');
     Piwik_AddWidget('Actions_Actions', 'Actions_WidgetPageTitles', 'Actions', 'getPageTitles');
     Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuOutlinks', 'Actions', 'getOutlinks');
     Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuDownloads', 'Actions', 'getDownloads');
     Piwik_AddWidget('Actions_Actions', 'Actions_WidgetPagesEntry', 'Actions', 'getEntryPageUrls');
     Piwik_AddWidget('Actions_Actions', 'Actions_WidgetPagesExit', 'Actions', 'getExitPageUrls');
     Piwik_AddWidget('Actions_Actions', 'Actions_WidgetEntryPageTitles', 'Actions', 'getEntryPageTitles');
     Piwik_AddWidget('Actions_Actions', 'Actions_WidgetExitPageTitles', 'Actions', 'getExitPageTitles');
     if ($this->isSiteSearchEnabled()) {
         Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetSearchKeywords', 'Actions', 'getSiteSearchKeywords');
         if (self::isCustomVariablesPluginsEnabled()) {
             Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetSearchCategories', 'Actions', 'getSiteSearchCategories');
         }
         Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetSearchNoResultKeywords', 'Actions', 'getSiteSearchNoResultKeywords');
         Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetPageUrlsFollowingSearch', 'Actions', 'getPageUrlsFollowingSiteSearch');
         Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetPageTitlesFollowingSearch', 'Actions', 'getPageTitlesFollowingSiteSearch');
     }
 }
Пример #17
0
 /** Provide Widgets */
 public function addWidgets()
 {
     Piwik_AddWidget('Site Search', Piwik_Translate('SiteSearch_MostPopularInternalSearches'), 'SiteSearch', 'keywordsWidget');
     Piwik_AddWidget('Site Search', Piwik_Translate('SiteSearch_InternalSearchEvolution'), 'SiteSearch', 'evolutionWidget');
     Piwik_AddWidget('Site Search', Piwik_Translate('SiteSearch_PercentageOfSearchUsers'), 'SiteSearch', 'searchPercentageWidget');
 }
Пример #18
0
        try {
            Piwik_Exec('ALTER TABLE ' . Piwik_Common::prefixTable('site') . " ADD `feedburnerName` VARCHAR( 100 ) DEFAULT NULL");
        } catch (Exception $e) {
            // mysql code error 1060: column already exists
            // if there is another error we throw the exception, otherwise it is OK as we are simply reinstalling the plugin
            if (!Zend_Registry::get('db')->isErrNo($e, '1060')) {
                throw $e;
            }
        }
    }
    function uninstall()
    {
        Piwik_Query('ALTER TABLE ' . Piwik_Common::prefixTable('site') . " DROP `feedburnerName`");
    }
}
Piwik_AddWidget('Example Widgets', 'Feedburner statistics', 'ExampleFeedburner', 'feedburner');
/**
 *
 * @package Piwik_ExampleFeedburner
 */
class Piwik_ExampleFeedburner_Controller extends Piwik_Controller
{
    /**
     * Simple feedburner statistics output
     *
     */
    function feedburner()
    {
        $view = Piwik_View::factory('feedburner');
        $idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
        $feedburnerFeedName = Piwik_FetchOne('SELECT feedburnerName 
Пример #19
0
 function addWidgets()
 {
     Piwik_AddWidget('VisitTime_SubmenuTimes', 'VisitTime_WidgetLocalTime', 'VisitTime', 'getVisitInformationPerLocalTime');
     Piwik_AddWidget('VisitTime_SubmenuTimes', 'VisitTime_WidgetServerTime', 'VisitTime', 'getVisitInformationPerServerTime');
 }
Пример #20
0
 function postLoad()
 {
     Piwik_AddWidget('General_Visitors', Piwik_Translate('UserCountry_WidgetLocation') . ' (' . Piwik_Translate('UserCountryMap_worldMap') . ')', 'UserCountryMap', 'worldMap');
 }
Пример #21
0
	function addWidgets()
	{
		Piwik_AddWidget('SEO', 'SEO_SeoRankings', 'SEO', 'getRank');
	}
Пример #22
0
 function addWidgets()
 {
     Piwik_AddWidget('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetLastVisits', 'VisitsSummary', 'getEvolutionGraph', array('columns' => array('nb_visits')));
     Piwik_AddWidget('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetVisits', 'VisitsSummary', 'getSparklines');
     Piwik_AddWidget('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetOverviewGraph', 'VisitsSummary', 'index');
 }
 function addWidgets()
 {
     Piwik_AddWidget('General_Visitors', 'CustomVariables_CustomVariables', 'CustomVariables', 'getCustomVariables');
 }
Пример #24
0
 function addWidgets()
 {
     Piwik_AddWidget('General_Visitors', 'VisitFrequency_WidgetOverview', 'VisitFrequency', 'getSparklines');
     Piwik_AddWidget('General_Visitors', 'VisitFrequency_WidgetGraphReturning', 'VisitFrequency', 'getEvolutionGraph', array('columns' => array('nb_visits_returning')));
 }
Пример #25
0
	function addWidgets()
	{
		Piwik_AddWidget( 'VisitsSummary_VisitsSummary', 'VisitTime_WidgetLocalTime', 'VisitTime', 'getVisitInformationPerLocalTime');
		Piwik_AddWidget( 'VisitsSummary_VisitsSummary', 'VisitTime_WidgetServerTime', 'VisitTime', 'getVisitInformationPerServerTime');
	}
Пример #26
0
 function addWidgets()
 {
     Piwik_AddWidget('General_Visitors', 'UserCountry_WidgetContinents', 'UserCountry', 'getContinent');
     Piwik_AddWidget('General_Visitors', 'UserCountry_WidgetCountries', 'UserCountry', 'getCountry');
 }
Пример #27
0
 /**
  * Adds the various User Settings widgets
  */
 function addWidgets()
 {
     // in this case, Widgets have same names as API reports
     foreach ($this->reportMetadata as $report) {
         list($category, $name, $controllerName, $controllerAction) = $report;
         if ($category == false) {
             continue;
         }
         Piwik_AddWidget($category, $name, $controllerName, $controllerAction);
     }
 }
Пример #28
0
 function addWidgets()
 {
     Piwik_AddWidget('Goals_Goals', 'Goals_GoalsOverview', 'Goals', 'widgetGoalsOverview');
     $goals = Piwik_Tracker_GoalManager::getGoalDefinitions(Piwik_Common::getRequestVar('idSite', null, 'int'));
     if (count($goals) > 0) {
         foreach ($goals as $goal) {
             Piwik_AddWidget('Goals_Goals', Piwik_Common::sanitizeInputValue($goal['name']), 'Goals', 'widgetGoalReport', array('idGoal' => $goal['idgoal']));
         }
     }
 }
 /**
  * Widgets f�r Kollektionen registrieren.
  * @param Piwik_Event_Notification $notification
  */
 function addWidget($notification)
 {
     Piwik_AddWidget('SLUB', 'Kollektionen', 'DigitalCollections', 'collections');
     Piwik_AddWidget('SLUB', 'Kollektionen - Projekte', 'DigitalCollections', 'collections_projects');
 }