Download the PHP package vskstudio/takt-core-php without Composer
On this page you can find all versions of the php package vskstudio/takt-core-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vskstudio/takt-core-php
More information about vskstudio/takt-core-php
Files in vskstudio/takt-core-php
Package takt-core-php
Short Description Framework-agnostic PHP core for Takt analytics: browser snippet renderer + server-to-server event client.
License MIT
Homepage https://github.com/vskstudio/takt-core-php
Informations about the package takt-core-php
takt-core-php
Framework-agnostic PHP core for Takt analytics: a browser snippet renderer and a server-to-server event client.
Install
SnippetRenderer
Render the tracking snippet server-side and echo it into your <head>.
Modes
The Mode enum controls how the bundle is delivered:
Mode::Inline(default) — embeds the bundle inline in a<script>tag that self-boots. No extra request, and CSP-friendly: passnonce:inOptionsto emit anonceattribute.Mode::Cdn— emits a deferred loader pointing at the jsDelivr-hosted bundle.Mode::Asset— emits a deferred loader pointing at a self-hosted/takt/takt.js.
The snippet honors domain, endpoint, outbound, files and excludeLocalhost. SPA tracking and Do-Not-Track respect are always on.
Takt (server-to-server client)
Send events directly from your backend, attributed to the real visitor.
- Requires an ingest-scoped API key bound to the domain.
- Use
->withVisitor($ip, $userAgent)so events are attributed to the visitor rather than your server. - Fire-and-forget by default: transport errors are swallowed. Call
->strict()to get a client that throws on failure (handy in tests). - The PSR-18 HTTP client and PSR-17 factories are auto-discovered (
php-http/discovery). You may also inject your own.
Wire payload
Events are posted as JSON with compact keys: n (name), d (domain), u (url), r (referrer), p (props) and $ (revenue). Screen width is not sent server-side.
License
MIT
All versions of takt-core-php with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
php-http/discovery Version ^1.19