![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/anfangola.com/wp-content/plugins/matomo/app/plugins/Goals/ |
<?php /** * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ namespace Piwik\Plugins\Goals; use Piwik\Plugins\VisitFrequency\API as VisitFrequencyAPI; class Archiver extends \Piwik\Plugin\Archiver { const VISITS_UNTIL_RECORD_NAME = 'visits_until_conv'; const DAYS_UNTIL_CONV_RECORD_NAME = 'days_until_conv'; const ITEMS_SKU_RECORD_NAME = 'Goals_ItemsSku'; const ITEMS_NAME_RECORD_NAME = 'Goals_ItemsName'; const ITEMS_CATEGORY_RECORD_NAME = 'Goals_ItemsCategory'; const SKU_FIELD = 'idaction_sku'; const NAME_FIELD = 'idaction_name'; const CATEGORY_FIELD = 'idaction_category'; const CATEGORY2_FIELD = 'idaction_category2'; const CATEGORY3_FIELD = 'idaction_category3'; const CATEGORY4_FIELD = 'idaction_category4'; const CATEGORY5_FIELD = 'idaction_category5'; const NO_LABEL = ':'; const LOG_CONVERSION_TABLE = 'log_conversion'; const VISITS_COUNT_FIELD = 'visitor_count_visits'; const SECONDS_SINCE_FIRST_VISIT_FIELD = 'visitor_seconds_since_first'; public function getDependentSegmentsToArchive() : array { $hasConversions = $this->getProcessor()->getNumberOfVisitsConverted() > 0; if (!$hasConversions) { return []; } return [VisitFrequencyAPI::NEW_VISITOR_SEGMENT, VisitFrequencyAPI::RETURNING_VISITOR_SEGMENT]; } /** * This array stores the ranges to use when displaying the 'visits to conversion' report */ public static $visitCountRanges = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 14], [15, 25], [26, 50], [51, 100], [100]]; /** * This array stores the ranges to use when displaying the 'days to conversion' report */ public static $daysToConvRanges = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 14], [15, 30], [31, 60], [61, 120], [121, 364], [364]]; protected $dimensionRecord = [self::SKU_FIELD => self::ITEMS_SKU_RECORD_NAME, self::NAME_FIELD => self::ITEMS_NAME_RECORD_NAME, self::CATEGORY_FIELD => self::ITEMS_CATEGORY_RECORD_NAME]; protected $actionMapping = [self::SKU_FIELD => 'idaction_product_sku', self::NAME_FIELD => 'idaction_product_name', self::CATEGORY_FIELD => 'idaction_product_cat', self::CATEGORY2_FIELD => 'idaction_product_cat2', self::CATEGORY3_FIELD => 'idaction_product_cat3', self::CATEGORY4_FIELD => 'idaction_product_cat4', self::CATEGORY5_FIELD => 'idaction_product_cat5']; /** * @param string $recordName 'nb_conversions' * @param int|bool $idGoal idGoal to return the metrics for, or false to return overall * @return string Archive record name */ public static function getRecordName($recordName, $idGoal = false) { $idGoalStr = ''; if ($idGoal !== false) { $idGoalStr = $idGoal . "_"; } return 'Goal_' . $idGoalStr . $recordName; } public static function getItemRecordNameAbandonedCart($recordName) { return $recordName . '_Cart'; } }