Skip to content
docs.
WORKSPACE

Your documentation

Explore the project catalog
Localzet ServerАсинхронный PHP-серверTriangleФреймворк и компонентыMIX IDИдентификация и интеграцииHack APIПубличные API хакатонаACNПроект и компонентыUserlay / UserNetПроект и компонентыAxiomПроект и компонентыМесседжинг через почтуПроект и компонентыLWT / JWT / JOSEПроект и компонентыФинансовая аналитика KimaiПроект и компонентыМультипарадигмальная БДПроект и компонентыZorin PlatformПроект и компонентыZorin TrustПроект и компонентыFloraScope / VegwatchПроект и компонентыaegis-qДокументация проектаaevumdbДокументация проектаauditДокументация проектаauto-invest-managerАвтотрейдерcaine-companionДокументация проектаcertbot-cloudflareДокументация проектаClusterLocalzet Server / ClustercmdveilДокументация проектаConsolePHP CLICronБиблиотеки Localzet Serverdata-connectorДокументация проектаdevice-controlDevice Controlenn-projectДокументация проектаEventsБиблиотеки Localzet ServerflowsintДокументация проектаforgeДокументация проектаHttpClientБиблиотеки Localzet ServerinterpreterСобственный языкinvariaДокументация проектаkeynotesДокументация проектаknotrouteKnotroutelaravel-personal-analyticsДокументация проектаlocalzet-osДокументация проектаmeridianДокументация проектаMQTTБиблиотеки Localzet Servernano-kernelСобственная ОСNoterДокументация проектаpersonal-analyticsДокументация проекта✓ProxyБиблиотеки Localzet ServerPSRБиблиотеки Localzet ServerPSR-7Библиотеки Localzet Serverrschs-monitorДокументация проектаsemsealДокументация проектаshardsealДокументация проектаSocketIOБиблиотеки Localzet ServerSOCKS5Библиотеки Localzet Serverstandalone-analyticsДокументация проектаstatic-php-cliДокументация проектаStorageБиблиотеки Localzet ServersutureДокументация проектаtempoweaveДокументация проектаttsСинтез речиTunnelБиблиотеки Localzet Serverui-kitUI KitvesperДокументация проектаWebAnalyzerWebAnalyzerzorin-access-brokerДокументация проектаzorin-authority-brokerДокументация проектаzorin-authority-sdk-phpДокументация проектаzorin-authority-sdk-pythonДокументация проектаzorin-authority-sdk-tsДокументация проектаzorin-client-intelДокументация проектаzorin-device-core-aospДокументация проектаzorin-host-agentДокументация проектаzorin-native-labДокументация проектаzorin-nodeДокументация проектаzorin-opsДокументация проектаdonstu-python-sdkДокументация проектаfloortraceFloortraceserver-rsLocalzet Server / Cluster
Catalog
Documentation/personal-analytics

personal-analytics — API

src/Analytics.php

function __construct(PDO $pdo, Config $config)

Localzet\PersonalAnalytics\CollectionResult

Section titled “Localzet\PersonalAnalytics\CollectionResult”

src/CollectionResult.php

function __construct(public bool $accepted, public ?string $refresh = null)
function toArray(): array

src/Collector.php

function __construct(private Repository $repository, private Config $config)
function collectJson(string $json, RequestContext $context): CollectionResult
function collect(array $payload, RequestContext $context): CollectionResult

src/Config.php

function __construct(public string $projectToken, public string $allowedHost, public array $allowedOrigins = [], public array $excludedIps = [], public bool $storeIp = false, public bool $trackQueryParameters = false, public int $eventRetentionDays = 365, public int $actionRetentionDays = 90, public int $replayRetentionDays = 30, public int $maxPayloadBytes = 1048576, public int $maxReplayChunkEvents = 100, public int $maxDecodedPayloadBytes = 33554432)

src/Goals.php

function __construct(private PDO $pdo)
function create(string $key, string $name, string $type, ?string $path = null): int
function all(): array

src/Heatmaps.php

function __construct(private PDO $pdo)
function create(string $key, string $name, string $path): int
function all(): array
function data(int $heatmapId, string $deviceType): array

src/Replays.php

function __construct(private PDO $pdo)
function latest(int $limit = 50, int $offset = 0): array
function events(int $replayId): array

src/Reports.php

function __construct(private PDO $pdo)
function summary(DateTimeInterface $from, DateTimeInterface $to): array
function timeline(DateTimeInterface $from, DateTimeInterface $to): array
function pages(DateTimeInterface $from, DateTimeInterface $to, int $limit = 50): array
function referrers(DateTimeInterface $from, DateTimeInterface $to, int $limit = 50): array
function utm(DateTimeInterface $from, DateTimeInterface $to, int $limit = 50): array
function goals(DateTimeInterface $from, DateTimeInterface $to): array
function audience(string $dimension, DateTimeInterface $from, DateTimeInterface $to, int $limit = 50): array
function events(DateTimeInterface $from, DateTimeInterface $to, ?string $category = null, int $limit = 100): array
function metric(string $eventName, string $metric, DateTimeInterface $from, DateTimeInterface $to): array

src/Repository.php

function __construct(private readonly PDO $pdo, private readonly Config $config)
function upsertVisitor(string $uuid, array $data, RequestContext $context, DateTimeImmutable $now): void
function storePageEvent(string $visitorUuid, string $sessionUuid, string $eventUuid, string $type, array $data, DateTimeImmutable $now): bool
function storeAction(string $visitorUuid, string $sessionUuid, string $eventUuid, string $type, array $data, int $count, ?string $heatmapKey, DateTimeImmutable $now): bool
function storeGenericEvent(string $telemetryUuid, string $visitorUuid, string $sessionUuid, string $eventUuid, string $category, string $name, array $data, DateTimeImmutable $now): bool
function appendReplay(string $visitorUuid, string $sessionUuid, string $chunkUuid, int $sequence, array $events, DateTimeImmutable $now): bool
function storeHeatmapSnapshot(string $key, string $deviceType, int $viewportWidth, array $events, DateTimeImmutable $now): void
function convertGoal(string $visitorUuid, string $sessionUuid, string $eventUuid, string $goalKey, string $currentPath, DateTimeImmutable $now): bool

src/RequestContext.php

function __construct(public ?string $origin = null, public ?string $ip = null, public ?string $userAgent = null, public ?string $acceptLanguage = null, public ?string $countryCode = null, public ?string $cityName = null, public ?string $osName = null, public ?string $browserName = null)

src/Retention.php

function __construct(private PDO $pdo)
function purge(?DateTimeImmutable $today = null): array