SettingsPiwik
Piwik\
SettingsPiwik
Contains helper methods that can be used to get common Matomo (formerly Piwik) settings.
Methods
The class defines the following methods:
getPiwikUrl()— Returns the URL to this Matomo instance, eg.isSegmentationEnabled()— Returnstrueif segmentation is allowed for this user,falseif otherwise.isUniqueVisitorsEnabled()— Returns true if unique visitors should be processed for the given period type.
getPiwikUrl()
Returns the URL to this Matomo instance, eg. https://demo.piwik.org/ or https://example.org/piwik/.
Signature
- Returns:
string|false— return false if no value is configured and we are in PHP CLI mode
isSegmentationEnabled()
Returns true if segmentation is allowed for this user, false if otherwise.
Signature
- It returns a
boolvalue.
isUniqueVisitorsEnabled()
Returns true if unique visitors should be processed for the given period type.
Unique visitor processing is controlled by the [General] enable_processing_unique_visitors_...
INI config options. By default, unique visitors are processed only for day/week/month periods.
Signature
- It accepts the following parameter(s):
$periodLabel(string) —"day","week","month","year"or"range"
- It returns a
boolvalue.