_analyticsHelper = $analyticsHelper; parent::__construct($context); } /** * Checks if Google Experiment is enabled * * @param string $store * @return bool */ public function isGoogleExperimentEnabled($store = null) { return $this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED, ScopeInterface::SCOPE_STORE, $store); } /** * Checks if Google Experiment is active * * @param string $store * @return bool */ public function isGoogleExperimentActive($store = null) { return $this->isGoogleExperimentEnabled($store) && $this->_analyticsHelper->isGoogleAnalyticsAvailable($store); } }