コード例 #1
0
 /**
  * By defining one or multiple segments a user will be able to filter their visitors by this column. For instance
  * show all reports only considering users having more than 10 achievement points. If you do not want to define a
  * segment for this dimension just remove the column.
  */
 protected function configureSegments()
 {
     $segment = new Segment();
     $segment->setSegment('achievementPoints');
     $segment->setCategory('General_Visit');
     $segment->setName('ExampleTracker_DimensionName');
     $segment->setAcceptedValues('Here you should explain which values are accepted/useful: Any number, for instance 1, 2, 3 , 99');
     $this->addSegment($segment);
 }
コード例 #2
0
 /**
  * By defining one or multiple segments a user will be able to filter their visitors by this column. For instance
  * show all actions only considering users having more than 10 achievement points. If you do not want to define a
  * segment for this dimension just remove the column.
  */
 protected function configureSegments()
 {
     $segment = new Segment();
     $segment->setSegment('keywords');
     $segment->setCategory('General_Actions');
     $segment->setName('ExampleTracker_DimensionName');
     $segment->setAcceptedValues('Here you should explain which values are accepted/useful: Any word, for instance MyKeyword1, MyKeyword2');
     $this->addSegment($segment);
 }
コード例 #3
0
ファイル: Provider.php プロジェクト: FluentDevelopment/piwik
 protected function configureSegments()
 {
     $segment = new Segment();
     $segment->setSegment('provider');
     $segment->setCategory('Visit Location');
     $segment->setName('Provider_ColumnProvider');
     $segment->setAcceptedValues('comcast.net, proxad.net, etc.');
     $this->addSegment($segment);
 }
コード例 #4
0
 /**
  * By defining one or multiple segments a user will be able to filter their visitors by this column. For instance
  * show all reports only considering users having more than 10 achievement points. If you do not want to define a
  * segment for this dimension just remove the column.
  */
 protected function configureSegments()
 {
     $segment = new Segment();
     $segment->setSegment('last_name');
     $segment->setCategory('General_Visit');
     $segment->setName('ClientCertificates_LastName');
     $segment->setAcceptedValues('Here you should explain which values are accepted/useful: Any number, for instance 1, 2, 3 , 99');
     $this->addSegment($segment);
 }
コード例 #5
0
ファイル: IdGoal.php プロジェクト: FluentDevelopment/piwik
 protected function configureSegments()
 {
     $segment = new Segment();
     $segment->setCategory('General_Visit');
     $segment->setName('General_VisitConvertedGoalId');
     $segment->setSegment('visitConvertedGoalId');
     $segment->setAcceptedValues('1, 2, 3, etc.');
     $this->addSegment($segment);
 }
コード例 #6
0
ファイル: TotalEvents.php プロジェクト: piwik/piwik
 protected function configureSegments()
 {
     $segment = new Segment();
     $segment->setSegment('events');
     $segment->setName('Events_TotalEvents');
     $segment->setAcceptedValues('To select all visits who triggered an Event, use: &segment=events>0');
     $segment->setCategory('General_Visit');
     $segment->setType(Segment::TYPE_METRIC);
     $this->addSegment($segment);
 }
コード例 #7
0
ファイル: UserId.php プロジェクト: cemo/piwik
 protected function configureSegments()
 {
     $segment = new Segment();
     $segment->setType('dimension');
     $segment->setSegment('userId');
     $segment->setCategory(Piwik::translate('General_Visit'));
     $segment->setName('General_UserId');
     $segment->setAcceptedValues('any non empty unique string identifying the user (such as an email address or a username).');
     $segment->setSqlSegment('log_visit.user_id');
     $segment->setRequiresAtLeastViewAccess(true);
     $this->addSegment($segment);
 }
コード例 #8
0
ファイル: VisitId.php プロジェクト: FluentDevelopment/piwik
 protected function configureSegments()
 {
     parent::configureSegments();
     $segment = new Segment();
     $segment->setType('dimension');
     $segment->setCategory(Piwik::translate('General_Visit'));
     $segment->setName(Piwik::translate('General_Visit') . " ID");
     $segment->setSegment('visitId');
     $segment->setAcceptedValues('Any integer.');
     $segment->setSqlSegment('log_visit.idvisit');
     $segment->setRequiresAtLeastViewAccess(true);
     $this->addSegment($segment);
 }
コード例 #9
0
ファイル: VisitorId.php プロジェクト: FluentDevelopment/piwik
 protected function configureSegments()
 {
     parent::configureSegments();
     $segment = new Segment();
     $segment->setType('dimension');
     $segment->setCategory(Piwik::translate('General_Visit'));
     $segment->setName('General_VisitorID');
     $segment->setSegment('visitorId');
     $segment->setAcceptedValues('34c31e04394bdc63 - any 16 Hexadecimal chars ID, which can be fetched using the Tracking API function getVisitorId()');
     $segment->setSqlSegment('log_visit.idvisitor');
     $segment->setSqlFilterValue(array('Piwik\\Common', 'convertVisitorIdToBin'));
     $segment->setRequiresAtLeastViewAccess(true);
     $this->addSegment($segment);
 }
コード例 #10
0
ファイル: VisitIp.php プロジェクト: FluentDevelopment/piwik
 protected function configureSegments()
 {
     parent::configureSegments();
     $segment = new Segment();
     $segment->setType('metric');
     $segment->setCategory(Piwik::translate('General_Visit'));
     $segment->setName('General_VisitorIP');
     $segment->setSegment('visitIp');
     $segment->setAcceptedValues('13.54.122.1. </code>Select IP ranges with notation: <code>visitIp>13.54.122.0;visitIp<13.54.122.255');
     $segment->setSqlSegment('log_visit.location_ip');
     $segment->setSqlFilterValue(array('Piwik\\Network\\IPUtils', 'stringToBinaryIP'));
     $segment->setRequiresAtLeastViewAccess(true);
     $this->addSegment($segment);
 }
コード例 #11
0
ファイル: DeviceType.php プロジェクト: piwik/piwik
 protected function configureSegments()
 {
     $deviceTypes = DeviceParser::getAvailableDeviceTypeNames();
     $deviceTypeList = implode(", ", $deviceTypes);
     $segment = new Segment();
     $segment->setCategory('General_Visit');
     $segment->setSegment('deviceType');
     $segment->setName('DevicesDetection_DeviceType');
     $segment->setAcceptedValues($deviceTypeList);
     $segment->setSqlFilter(function ($type) use($deviceTypeList, $deviceTypes) {
         $index = array_search(strtolower(trim(urldecode($type))), $deviceTypes);
         if ($index === false) {
             throw new Exception("deviceType segment must be one of: {$deviceTypeList}");
         }
         return $index;
     });
     $this->addSegment($segment);
 }