Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-04-15 02:21:06 +0300
committerGitHub <noreply@github.com>2020-04-15 02:21:06 +0300
commit17ab90beb13e1b9bde456e9fa79b99c6ad993aa2 (patch)
tree3098e0697c088405fb50facd3015c3979465cd7b
parent3c2456acfdc49d97c9afe015a69dd21bcd011652 (diff)
Add more parameters to the computeNbUnique event (#15808)
-rw-r--r--CHANGELOG.md5
-rw-r--r--core/ArchiveProcessor.php7
2 files changed, 10 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a34126692..1e0a2a5cc8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,11 @@ This is the Developer Changelog for Matomo platform developers. All changes in o
The Product Changelog at **[matomo.org/changelog](https://matomo.org/changelog)** lets you see more details about any Matomo release, such as the list of new guides and FAQs, security fixes, and links to all closed issues.
+## Matomo 3.13.5
+
+### New API
+* A new event `ArchiveProcessor.ComputeNbUniques.getIdSites` was added so plugins can change which site IDs should be included when processing the number unique visitors and users for a specific site.
+
## Matomo 3.13.1
### Deprecations
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php
index d5061d9f07..26e2c65f79 100644
--- a/core/ArchiveProcessor.php
+++ b/core/ArchiveProcessor.php
@@ -480,7 +480,8 @@ class ArchiveProcessor
private function getIdSitesToComputeNbUniques()
{
- $sites = array($this->getParams()->getSite()->getId());
+ $params = $this->getParams();
+ $sites = array($params->getSite()->getId());
/**
* Triggered to change which site ids should be looked at when processing unique visitors and users.
@@ -488,8 +489,10 @@ class ArchiveProcessor
* @param array &$idSites An array with one idSite. This site is being archived currently. To cancel the query
* you can change this value to an empty array. To include other sites in the query you
* can add more idSites to this list of idSites.
+ * @param Period $period The period that is being requested to be archived.
+ * @param Segment $segment The segment that is request to be archived.
*/
- Piwik::postEvent('ArchiveProcessor.ComputeNbUniques.getIdSites', array(&$sites));
+ Piwik::postEvent('ArchiveProcessor.ComputeNbUniques.getIdSites', array(&$sites, $params->getPeriod(), $params->getSegment()));
return $sites;
}