From 7cfe4ebffa5c33ded770090ecec1079c5163d0e0 Mon Sep 17 00:00:00 2001 From: Altamash Shaikh Date: Tue, 11 Nov 2025 19:03:19 +0530 Subject: [PATCH 1/2] Fixes fatal error, #198 --- CHANGELOG.md | 3 +++ Columns/CampaignName.php | 2 +- plugin.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1c232b..605b9b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +#### 5.1.4 - 2025-11-12 +- Fixed fatal error due to new code to track AI referrer visit + #### 5.1.4 - 2025-11-10 - Fixed incorrectly forcing a new visit for visits referred by AI referrers diff --git a/Columns/CampaignName.php b/Columns/CampaignName.php index 0a3a766..7e00719 100644 --- a/Columns/CampaignName.php +++ b/Columns/CampaignName.php @@ -58,7 +58,7 @@ public function shouldForceNewVisit(Request $request, Visitor $visitor, Action $ // That one will be detected as AI Assistant by core. But if someone reloads that page // and the utm source is still present, the check here might otherwise force a new visit, // if the `utm_source` parameter is configured. - if ((int)$visitor->getVisitorColumn('referer_type') === 8 && count($campaignDimensions) === 1) { + if ((int)$visitor->getVisitorColumn('referer_type') === 8 && !empty($campaignDimensions) && count($campaignDimensions) === 1) { $paramValue = reset($campaignDimensions); if (class_exists('Piwik\Plugins\Referrers\AIAssistant') && \Piwik\Plugins\Referrers\AIAssistant::getInstance()->getAIAssistantFromDomain($paramValue)) { return false; diff --git a/plugin.json b/plugin.json index 3552a45..7c8b650 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "MarketingCampaignsReporting", "description": "Measure the effectiveness of your marketing campaigns. New reports, segments & track up to five channels: campaign, source, medium, keyword, content.", - "version": "5.1.4", + "version": "5.1.5", "keywords": ["Campaign", "Marketing", "Channels", "UTM tags"], "license": "GPL v3+", "homepage": "https://matomo.org", From 8f7daa87fccaef0f72614af92fe4ffa50843edaa Mon Sep 17 00:00:00 2001 From: Altamash Shaikh Date: Tue, 11 Nov 2025 19:07:38 +0530 Subject: [PATCH 2/2] Fixes changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 605b9b7..dcca2bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Changelog -#### 5.1.4 - 2025-11-12 +#### 5.1.5 - 2025-11-11 - Fixed fatal error due to new code to track AI referrer visit #### 5.1.4 - 2025-11-10