Search by

credvault / post-analytics-php

Samuel Mbugua

First-party Post Analytics SDK for PHP

Package info

github.com/CREDVAULTHQ/post-analytics-php

pkg:composer/credvault/post-analytics-php

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

0.1.1 2026-12-03 00:18 UTC

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.