public function __construct($segmentCondition, $idSites)
{
$this->segmentQueryBuilder = StaticContainer::get('Piwik\\DataAccess\\LogQueryBuilder');
$segmentCondition = trim($segmentCondition);
if (!SettingsPiwik::isSegmentationEnabled() && !empty($segmentCondition)) {
throw new Exception("The Super User has disabled the Segmentation feature.");
}
// First try with url decoded value. If that fails, try with raw value.
// If that also fails, it will throw the exception
try {
$this->initializeSegment(urldecode($segmentCondition), $idSites);
} catch (Exception $e) {
$this->initializeSegment($segmentCondition, $idSites);
}
}