mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Add logic to send visits to a matomo instance
This commit is contained in:
@@ -188,6 +188,11 @@ class Visit extends AbstractEntity implements JsonSerializable
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function userAgent(): string
|
||||
{
|
||||
return $this->userAgent;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -75,6 +75,6 @@ class VisitsTracker implements VisitsTrackerInterface
|
||||
$this->em->persist($visit);
|
||||
$this->em->flush();
|
||||
|
||||
$this->eventDispatcher->dispatch(UrlVisited::withOriginalIpAddress($visit->getId(), $visitor->remoteAddress));
|
||||
$this->eventDispatcher->dispatch(new UrlVisited($visit->getId(), $visitor->remoteAddress));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user