Перейти к содержимому
docs.
WORKSPACE

Документации проектов

Открыть каталог проектов
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
Каталог
Документация/standalone-analytics

standalone-analytics

[Image: License: AGPL v3 or later](https://github.com/localzet/standalone-analytics/blob/HEAD/LICENSE) [Image: PHP](https://github.com/localzet/standalone-analytics/blob/HEAD/php/composer.json) [Image: Laravel](https://github.com/localzet/standalone-analytics/blob/HEAD/laravel/composer.json) [Image: Node.js](https://github.com/localzet/standalone-analytics/blob/HEAD/tracker/package.json)

Standalone, single-project analytics extracted from the Localzet Analytics tracking model. The folder is intentionally a small integration kit rather than another SaaS application.

It contains:

  • laravel/ — production-oriented Laravel 13 adapter with PostgreSQL partitions, queues, rollups, S3-compatible replay/heatmap storage and a complete protected analytics console;
  • php/ — framework-agnostic MySQL/PDO ingestion, goals and reports for small non-Laravel integrations;
  • tracker/ — TypeScript browser SDK with autocapture, attribution, product/ecommerce events, diagnostics, heatmaps and rrweb recording;
  • examples/plain-php/ — minimal collector/reporting endpoints and an admin page;
  • docs/architecture.md — extraction decisions and a mapping from the original monolith.

Release preparation for Packagist and npm is documented in docs/publishing.md.

The three packages are independently publishable:

Окно терминала
cd php
composer install
cd ../laravel
composer install
cd ../tracker
npm install
npm run build

Apply php/database/mysql.sql, construct Localzet\PersonalAnalytics\Analytics, and route JSON requests to Collector::collect(). See examples/plain-php for a complete adapter.

Browser integration:

import { createAnalytics } from '@localzet/personal-analytics-tracker';
const analytics = createAnalytics({
endpoint: 'https://admin.example.test/analytics/collect.php',
projectToken: 'replace-with-a-random-public-token',
ignoreDnt: true,
autocapture: true,
trackPerformance: true,
trackErrors: true,
trackNetwork: true,
recordReplays: true,
replaySampleRate: 0.25,
goals: [{ key: 'checkout', type: 'pageview', path: '/checkout/success' }],
heatmaps: [{ key: 'home', path: '/' }],
});
analytics.start();
analytics.goal('signup');
analytics.track('pricing_calculator_used', { plan: 'business' });
analytics.ecommerce('purchase', { orderId: 'A-42', revenue: 1990, currency: 'RUB' });

ignoreDnt is explicit. Without it, the tracker does not start when DNT is enabled. Input values are masked in rrweb; request bodies, form values, credentials and payment data are never collected. Sensitive keys are redacted before transport and again on the server.

This kit has exactly one analytics project per installation. It has no users, websites, teams, plans, billing or quotas. The console can use the host application’s Laravel authentication or its own independent admin token. The public project token identifies traffic but is never accepted as an admin secret; ingestion is additionally restricted by the configured host/origin.

Licensed under AGPL-3.0-or-later. When redistributing the project or substantial portions of it, keep the copyright, license and attribution notices, including the link to the original repository. See NOTICE.

rrweb and other third-party dependencies are distributed under their respective licenses.

Исходный код · AGPL-3.0