Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-google-analytics
Helper
Data.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\GoogleAnalytics\Helper
;
7
8
use
Magento\Store\Model\Store
;
9
use
Magento\Store\Model\ScopeInterface
;
10
17
class
Data
extends
\Magento\Framework\App\Helper\AbstractHelper
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
}
Magento\GoogleAnalytics\Helper
Definition:
Data.php:6
Magento\Store\Model\ScopeInterface\SCOPE_STORE
const SCOPE_STORE
Definition:
ScopeInterface.php:21
Magento\GoogleAnalytics\Helper\Data\XML_PATH_ANONYMIZE
const XML_PATH_ANONYMIZE
Definition:
Data.php:26
Magento\GoogleAnalytics\Helper\Data\isAnonymizedIpActive
isAnonymizedIpActive($store=null)
Definition:
Data.php:47
Magento\GoogleAnalytics\Helper\Data
Definition:
Data.php:17
Magento\GoogleAnalytics\Helper\Data\XML_PATH_ACCOUNT
const XML_PATH_ACCOUNT
Definition:
Data.php:24
Magento\Store\Model\ScopeInterface
Definition:
ScopeInterface.php:12
Magento\GoogleAnalytics\Helper\Data\XML_PATH_ACTIVE
const XML_PATH_ACTIVE
Definition:
Data.php:22
$store
$store
Definition:
payment_configuration_rollback.php:33
Magento\Store\Model\Store
Definition:
Store.php:38
Magento\Framework\App\Helper\AbstractHelper
Definition:
AbstractHelper.php:13
Magento\GoogleAnalytics\Helper\Data\isGoogleAnalyticsAvailable
isGoogleAnalyticsAvailable($store=null)
Definition:
Data.php:34