和顺 / 周行 返回所属 Agent
ZX-10.01

分阶段观察

原能力

分别收集曝光、理解、认同和行动证据,保存口径、来源及样本限制。(细化版 p.6–7)

首选项目

Matomo(GPL-3.0 平台核心)。 Matomo

匹配范围

Reporting API、Events、Goals 按渠道与窗口聚合。

源码

Matomo · public function getCategory(

plugins/Events/API.php · 229–242 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    public function getCategory($idSite, string $period, string $date, $segment = false, bool $expanded = false, $secondaryDimension = false, bool $flat = false)
    {
        return $this->getDataTable(__FUNCTION__, $idSite, $period, $date, $segment, $expanded, false, $secondaryDimension, $flat);
    }

    /**
     * Returns event metrics grouped by event action.
     *
     * @param int|string|int[] $idSite Website ID(s) to query.
     *                                 - Single site ID (e.g. 1)
     *                                 - Multiple site IDs (e.g. [1, 4, 5])
     *                                 - Comma-separated list ("1,4,5") or "all"
     * @param 'day'|'week'|'month'|'year'|'range' $period The period to process, processes data for the period
     *                                                    containing the specified date.

Matomo · public function get(

plugins/Goals/API.php · 892–905 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    public function get($idSite, string $period, string $date, $segment = false, $idGoal = false, $columns = [], bool $showAllGoalSpecificMetrics = false, bool $compare = false)
    {
        Piwik::checkUserHasViewAccess($idSite);

        $table = null;

        $segments = array(
            '' => false,
            '_new_visit' => VisitFrequencyAPI::NEW_VISITOR_SEGMENT,
            '_returning_visit' => VisitFrequencyAPI::RETURNING_VISITOR_SEGMENT,
        );

        foreach ($segments as $appendToMetricName => $predefinedSegment) {
            $startingArchiveDependent = \Piwik\Plugin\Archiver::$ARCHIVE_DEPENDENT;

实现与验收要点

理解、认同的原始资料及样本偏差单独评价。