Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Data.php
Go to the documentation of this file.
1 <?php
7 
10 
18 {
22  const XML_PATH_ACTIVE = 'google/analytics/active';
23 
24  const XML_PATH_ACCOUNT = 'google/analytics/account';
25 
26  const XML_PATH_ANONYMIZE = 'google/analytics/anonymize';
27 
34  public function isGoogleAnalyticsAvailable($store = null)
35  {
36  $accountId = $this->scopeConfig->getValue(self::XML_PATH_ACCOUNT, ScopeInterface::SCOPE_STORE, $store);
37  return $accountId && $this->scopeConfig->isSetFlag(self::XML_PATH_ACTIVE, ScopeInterface::SCOPE_STORE, $store);
38  }
39 
47  public function isAnonymizedIpActive($store = null)
48  {
49  return $this->scopeConfig->getValue(self::XML_PATH_ANONYMIZE, ScopeInterface::SCOPE_STORE, $store);
50  }
51 }
isAnonymizedIpActive($store=null)
Definition: Data.php:47
isGoogleAnalyticsAvailable($store=null)
Definition: Data.php:34