credvault / post-analytics-php
First-party Post Analytics SDK for PHP
Requires
- php: >=8.1
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-12-03 23:55:22 UTC
README
CredVault Post Analytics is a hosted analytics service for developers and businesses. This PHP client sends server-side events to your Post project.
Install
The versioned PHP SDK source release is public. Packagist registration is still pending, so the package-manager install command is not available yet. After registration, install it with:
composer require credvault/post-analytics-php:^0.1.1
Send an event
Read the project API key from your server environment. Keep it out of browser or mobile client code.
$post = new \CredVault\PostAnalytics\PostAnalytics( getenv('POST_PROJECT_API_KEY'), getenv('POST_ANALYTICS_HOST') ?: 'https://post.credvault.net' ); $post->capture('invoice_paid', (string) $invoice->customerId, ['amount' => $invoice->amount]);
The client uses PHP's HTTP stream transport and sends requests to the Post ingestion endpoints. See the included LICENSE for the package terms.