Create command to send visits to matomo

This commit is contained in:
Alejandro Celaya
2024-04-13 09:55:40 +02:00
parent 4fdbcc25a0
commit 6121efec59
11 changed files with 260 additions and 10 deletions

View File

@@ -4,9 +4,19 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Matomo;
use Shlinkio\Shlink\Common\Util\DateRange;
use Shlinkio\Shlink\Core\Matomo\Model\SendVisitsResult;
use Shlinkio\Shlink\Core\Visit\Entity\Visit;
interface MatomoVisitSenderInterface
{
public function sendVisitToMatomo(Visit $visit, ?string $originalIpAddress = null): void;
/**
* Sends all visits in provided date range to matomo, and returns the amount of affected visits
*/
public function sendVisitsInDateRange(
DateRange $dateRange,
VisitSendingProgressTrackerInterface|null $progressTracker = null,
): SendVisitsResult;
public function sendVisit(Visit $visit, ?string $originalIpAddress = null): void;
}