Telesink PHP SDK
Telesink is built in Ruby on Rails, so Ruby came first, JavaScript second, and now PHP is here. The official
telesink/telesink package
brings the same dead-simple experience to any PHP application.
It is deliberately tiny, has zero external dependencies (only built-in
curl + random_bytes), and gets out of your way.
You install it, set one environment variable, and start sending events.
Installation
Run:
composer require telesink/telesink
Configuration
The SDK is configured entirely through environment variables. No classes to instantiate, no config files, no YAML.
Set your sink endpoint:
export TELESINK_ENDPOINT=https://app.telesink.com/api/v1/sinks/your_sink_token_here/events
For self-hosted instances, just change the URL to point at your own server.
To disable tracking (for example in tests or local development):
export TELESINK_DISABLED=true
Usage
use Telesink\Telesink as Telesink;
Telesink::track([
'event' => 'user.signed.up',
'text' => '[email protected]',
'emoji' => '👤',
'properties' => [
'plan' => 'pro',
'source' => 'landing_page',
'user_id' => 123,
'email' => '[email protected]'
],
// occurred_at and idempotency_key are optional (defaults are provided)
]);
The method returns true if the event was sent successfully and
false otherwise (disabled, missing endpoint, or network error).
It will never raise exceptions — any errors are logged via error_log()
and the call fails gracefully so your app stays happy.
What’s under the hood
The entire package is ~80 lines of plain PHP. It:
- adds an
Idempotency-Keyheader automatically - tags every payload with
sdk: { name: "telesink.php", version: "1.0.0" } - times out after 3 seconds
- works identically with the hosted version and any self-hosted instance
Next steps
Ruby → JavaScript → PHP. I’ll be shipping official SDKs for Python, Go, and more next — let me know on X which one you want first.
Other official SDKs:
• Telesink Ruby SDK
• Telesink JavaScript SDK
The complete source is at github.com/telesink/telesink-php. It’s MIT licensed, obviously.
Now go connect your PHP app (Laravel, Symfony, WordPress, plain old PHP — it doesn’t matter) and watch events appear instantly in your Telesink feed.
Follow along on X at @kyrylo.