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. http://demo.piwik.org/ or http://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 bool value.

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 bool value.