diff options
Diffstat (limited to 'plugins/UserCountry/Columns/Latitude.php')
-rw-r--r-- | plugins/UserCountry/Columns/Latitude.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/UserCountry/Columns/Latitude.php b/plugins/UserCountry/Columns/Latitude.php new file mode 100644 index 0000000000..64713c70f1 --- /dev/null +++ b/plugins/UserCountry/Columns/Latitude.php @@ -0,0 +1,32 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ +namespace Piwik\Plugins\UserCountry\Columns; + +use Piwik\Piwik; +use Piwik\Plugin\VisitDimension; +use Piwik\Plugins\UserCountry\Segment; + +class Latitude extends VisitDimension +{ + protected $fieldName = 'location_latitude'; + + protected function init() + { + $segment = new Segment(); + $segment->setSegment('latitude'); + $segment->setName('UserCountry_Latitude'); + $segment->setAcceptValues('-33.578, 40.830, etc.<br/>You can select visitors within a lat/long range using &segment=lat>X;lat<Y;long>M;long<N.'); + $this->addSegment($segment); + } + + public function getName() + { + return Piwik::translate('UserCountry_Latitude'); + } +}
\ No newline at end of file |