Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
Data Class Reference
Inheritance diagram for Data:
AbstractHelper

Public Member Functions

 isGoogleAnalyticsAvailable ($store=null)
 
 isAnonymizedIpActive ($store=null)
 
- Public Member Functions inherited from AbstractHelper
 __construct (Context $context)
 
 isModuleOutputEnabled ($moduleName=null)
 

Data Fields

const XML_PATH_ACTIVE = 'google/analytics/active'
 
const XML_PATH_ACCOUNT = 'google/analytics/account'
 
const XML_PATH_ANONYMIZE = 'google/analytics/anonymize'
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractHelper
 _getRequest ()
 
 _getModuleName ()
 
 _getUrl ($route, $params=[])
 
- Protected Attributes inherited from AbstractHelper
 $_moduleName
 
 $_request
 
 $_moduleManager
 
 $_logger
 
 $_urlBuilder
 
 $_httpHeader
 
 $_eventManager
 
 $_remoteAddress
 
 $urlEncoder
 
 $urlDecoder
 
 $scopeConfig
 
 $_cacheConfig
 

Detailed Description

GoogleAnalytics data helper

@api

Since
100.0.2

Definition at line 17 of file Data.php.

Member Function Documentation

◆ isAnonymizedIpActive()

isAnonymizedIpActive (   $store = null)

Whether anonymized IPs are active

Parameters
null | string | bool | int | Store$store
Returns
bool
Since
100.2.0

Definition at line 47 of file Data.php.

48  {
49  return $this->scopeConfig->getValue(self::XML_PATH_ANONYMIZE, ScopeInterface::SCOPE_STORE, $store);
50  }

◆ isGoogleAnalyticsAvailable()

isGoogleAnalyticsAvailable (   $store = null)

Whether GA is ready to use

Parameters
null | string | bool | int | Store$store
Returns
bool

Definition at line 34 of file Data.php.

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  }

Field Documentation

◆ XML_PATH_ACCOUNT

const XML_PATH_ACCOUNT = 'google/analytics/account'

Definition at line 24 of file Data.php.

◆ XML_PATH_ACTIVE

const XML_PATH_ACTIVE = 'google/analytics/active'

Config paths for using throughout the code

Definition at line 22 of file Data.php.

◆ XML_PATH_ANONYMIZE

const XML_PATH_ANONYMIZE = 'google/analytics/anonymize'

Definition at line 26 of file Data.php.


The documentation for this class was generated from the following file: