Conversation
Replaces a value re-export/import of a type-only entity so the esbuild-based Vite build can bundle it, and rebuilds the Vue dist files with the new toolchain.
Companion to matomo-org/matomo DEV-20451. The new accurate archiver backfills time_spent via visit_last_action_time, so sum_time_spent and avg_time_on_page shift for last-pageview rows; the interim nb_hits_with_time_spent metric has been dropped in favor of the existing nb_hits divisor.
# Conflicts: # vue/dist/CustomVariables.umd.js # vue/dist/CustomVariables.umd.min.js
…time The core writer now closes pageviews at the next in-visit action (closePreviousPageView), so log_page_view_time.time_spent reflects real wall-clock time rather than the legacy walk-forward sum. Live visitor log timeSpent updates accordingly (1620s -> 360s for the ManyVisitsWithGeoIP pageview at t+1h).
matomo-php-tracker 3.4.0 types setCustomVariable()'s $name as string, so the deliberately-invalid array name now raises a TypeError. The id (6) is already out of the valid range and not tracked, so the string variant on the line above keeps the same coverage and the expected output is unchanged.
The invalid (array) custom-variable name can no longer be passed through the type-safe setCustomVariable(); inject it directly into the public visitorCustomVar payload so the fixture still verifies a malformed cvar is not tracked. Cannot use a raw _cvar param (custom param / debug append) because it would duplicate and override the valid cvars in the request.
* Prepare for Matomo 6 Bump plugin version to 6.0.0 and require Matomo >=6.0.0-b1,<7.0.0-b1. * Run tests on same PHP versions as core (8.1, 8.5) * Rebuild Vue dist files with the Vite build for Matomo 6 & fix ESLint violations (#134) * Adapt Vue sources to the Vite build and rebuild dist for Matomo 6 Replaces a value re-export/import of a type-only entity so the esbuild-based Vite build can bundle it, and rebuilds the Vue dist files with the new toolchain. * Rebuild Vue dist files for Vue 3.5 * Fix CustomVariables Vue declaration type errors Export the usage-row interface, cast the readonly usage to the sort helper, and coerce numeric translate args. * Fix segmentMatchNONE system test for MySQL 8.0 (#135) * Fix segmentMatchNONE test for MySQL 8.0 Comparing date/time segments against the placeholder string 'campaign' (e.g. visitEndServerDate != 'campaign') is rejected by MySQL 8.0 as an invalid DATE value; MySQL 5.7 tolerated it. Give each date/time segment a valid, type-appropriate value instead - a date for DATE() segments and an integer for the HOUR()/MINUTE()/YEAR()/... extractions - so they stay covered and the query runs on MySQL 8.0. The matched result is unchanged (the segment still matches no visits via the impossible deviceType condition). * Run plugin tests against MySQL 8.0 and MariaDB 10.6 The workflow inherited the shared action's MySQL 5.7 default, which is below Matomo's new minimum. Pin the database-backed jobs to the supported floor: PluginTests now runs a MySQL 8.0 + MariaDB 10.6 matrix, and the UI job runs on MySQL 8.0. * Only upload plugin test artifacts for the MySQL matrix leg PluginTests runs a MySQL + MariaDB matrix; the upload-artifacts condition matched both legs and uploaded twice. Restrict the upload to the MySQL leg. * Update expected UI screenshots for the new headless Chrome (Node 24 / Puppeteer 24) (#136) * Update expected UI screenshots for the new headless Chrome (Node 24 / Puppeteer 24) * Run the plugin UI tests on Node 24 Match the Node 24 / Puppeteer 24 screenshot-testing stack; the UI job was still pinned to Node 16. * Drop array custom-variable name from tracking fixture for matomo-php-tracker 4.0 (#137) * Drop the array custom-variable name from the tracking fixture matomo-php-tracker 3.4.0 types setCustomVariable()'s $name as string, so the deliberately-invalid array name now raises a TypeError. The id (6) is already out of the valid range and not tracked, so the string variant on the line above keeps the same coverage and the expected output is unchanged. * Recover the malformed-custom-variable coverage via direct cvar injection The invalid (array) custom-variable name can no longer be passed through the type-safe setCustomVariable(); inject it directly into the public visitorCustomVar payload so the fixture still verifies a malformed cvar is not tracked. Cannot use a raw _cvar param (custom param / debug append) because it would duplicate and override the valid cvars in the request. * Remove the unminified Vue UMD bundle (#140) Matomo's Vue build no longer emits <Plugin>.umd.js. Only the minified CustomVariables.umd.min.js is ever served: PluginUmdAssetFetcher looks exclusively for .umd.min.js, and development mode uses the .development.umd.js produced by vue:build --watch. The unminified bundle was a leftover from Vue CLI, whose lib build emitted it alongside the minified one for free. See matomo-org/matomo#25027. * Add the 6.0.0 changelog entry [ignore_release] The Matomo 6 preparation bumped plugin.json to 6.0.0 but never recorded the version in the changelog, leaving the released 5.0.6 as the newest entry. * Use the matomo6_* PHP version aliases in the test workflow [ignore_release] The matrix pinned the literals 8.1 / 8.5. github-action-tests resolves matomo6_min_php / matomo6_max_php to the same versions today and keeps following core's supported range, so the workflow no longer drifts when core moves its PHP floor or ceiling.
* Add percent-of-total metric columns to system test expected files
Matomo core adds always-on {metric}_percent_of_total columns to report
rows in API responses (matomo-org/matomo#24983, Matomo 6). These expected
files include the new columns and only pass against a Matomo 6 core that
contains that change.
* Describe percent-of-total metrics in processed report metadata expected file
Currently translated at 100.0% (23 of 23 strings) Translation: Matomo/Plugin CustomVariables Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-customvariables/zh_Hant/ [ci skip]
…ables Translations update from Hosted Weblate
Currently translated at 100.0% (23 of 23 strings) Translation: Matomo/Plugin CustomVariables Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-customvariables/de/ [ci skip] Co-authored-by: Pixelcode <{pixelcode|git}@pgp.forgoodeyesonly.eu>
Currently translated at 100.0% (23 of 23 strings) Translation: Matomo/Plugin CustomVariables Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-customvariables/zh_Hant/ [ci skip] Co-authored-by: Lay <brownsugar.idv.tw@gmail.com>
…ch weekly [ignore_release] (#146) * Put the pull request checks behind the shared umbrella [ignore_release] The callers this replaces were already thin wrappers around the same shared workflows, so one caller means a check added centrally reaches this plugin without a pull request here. It also drops the concurrency group the checklist workflow carried, which would span both of the umbrella's lanes and defeat them. * Build the non-default dev branch weekly [ignore_release] GitHub runs `schedule` only from the default branch's copy of a workflow, so the other maintained branch has had no weekly build of its own. The cron keeps this plugin's own minute and hour, moved to Sunday, so the fleet stays staggered.
* Correct four annotations and state the tracker returns [ignore_release] getDataTable documented @PARAM Date for a value its callers pass as the request date string, and @PARAM int for an idSubtable one call site passes as null; the Date import went with it. An inline @var DataTable sat above a StaticContainer call rather than the variable it describes. aggregateCustomVariable declared string $slot although its only caller passes the loop counter, and PHP was coercing it. processRequestParams and afterRequestProcessed now return the bool core documents and reads as $abort - previously null, which is equally falsy. A guard on a concatenation that always contains a space could never be false. * Run PHPStan at level 5 [ignore_release] Three ignores are recorded with their reasons: queueFilter and queueFilterSubtables wrap a non-array parameter themselves, Row::setColumn and deleteColumn are untyped while archiving addresses columns by integer Metrics::INDEX_* constants, and the Matomo version guard reads as decided because the analysis only sees one Matomo. * Pass the filter parameters as an array instead of ignoring the finding [ignore_release] queueFilter() and queueFilterSubtables() document @PARAM array, and every other plugin passes one -- PagePerformance, Bandwidth, CrashAnalytics, MediaAnalytics and BotTracking all do. DataTable wraps a non-array itself, so this is identical at runtime, but it matches the contract and the house style, which is better than recording an exception for it. * Pin the analysis exceptions to identifier, path and count [ignore_release] A message regex over a whole file absorbs any future finding that happens to match it. Each exception now names the PHPStan identifier, the file it belongs to, and exactly how many occurrences are expected, so a new one fails the build and is reported on its own line rather than being silently suppressed.
Byte-identical to hooks/pre-push in matomo-org/plugin-ci-workflows, with verify-hook turned on so the copy cannot drift from it silently. The hook dispatches on phpstan/phpstan.created.neon and phpstan.modified.neon and silently analyses nothing without them, so both ship alongside it.
Scheduled reports now include the percent-of-total columns, and the percentages without the metric they belong to are no longer added. Companion to matomo-org/matomo#24990.
Points at the shared workflow in plugin-ci-workflows rather than the private one: GitHub resolves a reusable workflow from the callee repository access policy at parse time, so a public caller cannot be granted access to a private repository. The wrapper is label-gated and does nothing until the codex-review label is added.
The writer records a row for a site search, and the visits log now reports it instead of discarding the field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion submodule PR for matomo-org/matomo#24788 — updates the checked-in expected fixture(s) so they match the new accurate per-pageview time-on-page output.
Checklist