diff --git a/CHANGELOG.md b/CHANGELOG.md index f1c232b..dcca2bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +#### 5.1.5 - 2025-11-11 +- 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",