Skip to content
Corex

BlogAnalyticsService

Corex\Config\Blog\BlogAnalyticsService · class · Config layer

First-party, consent-aware Blog analytics counters.

__construct(ReadingEventStore $events, string $hashSalt)

Section titled “__construct(ReadingEventStore $events, string $hashSalt)”

recordView(int $postId, string $visitorKey, string $ipAddress, string $userAgent, bool $consented, DateTimeImmutable $occurredAt): ?ReadingEvent

Section titled “recordView(int $postId, string $visitorKey, string $ipAddress, string $userAgent, bool $consented, DateTimeImmutable $occurredAt): ?ReadingEvent”

recordRead(int $postId, string $visitorKey, string $ipAddress, string $userAgent, int $readingSeconds, bool $consented, DateTimeImmutable $occurredAt): ?ReadingEvent

Section titled “recordRead(int $postId, string $visitorKey, string $ipAddress, string $userAgent, int $readingSeconds, bool $consented, DateTimeImmutable $occurredAt): ?ReadingEvent”

recordShareClick(int $postId, string $visitorKey, string $ipAddress, string $userAgent, string $target, bool $consented, DateTimeImmutable $occurredAt): ?ReadingEvent

Section titled “recordShareClick(int $postId, string $visitorKey, string $ipAddress, string $userAgent, string $target, bool $consented, DateTimeImmutable $occurredAt): ?ReadingEvent”

aggregate(int $postId, DateTimeImmutable $since, DateTimeImmutable $until): BlogAnalyticsAggregate

Section titled “aggregate(int $postId, DateTimeImmutable $since, DateTimeImmutable $until): BlogAnalyticsAggregate”