Track short URL title as document title when sending visits to matomo

This commit is contained in:
Alejandro Celaya
2024-03-31 13:51:03 +02:00
parent 401046fbe5
commit 284b28e8d9
5 changed files with 17 additions and 10 deletions

View File

@@ -72,7 +72,7 @@ class SendVisitToMatomoTest extends TestCase
$tracker->expects($this->once())->method('setUrl')->willReturn($tracker);
$tracker->expects($this->once())->method('setUserAgent')->willReturn($tracker);
$tracker->expects($this->once())->method('setUrlReferrer')->willReturn($tracker);
$tracker->expects($this->once())->method('doTrackPageView')->with('');
$tracker->expects($this->once())->method('doTrackPageView')->with($visit->shortUrl?->title() ?? '');
if ($visit->isOrphan()) {
$tracker->expects($this->exactly(2))->method('setCustomTrackingParameter')->willReturnMap([