PHPackages                             th3mouk/reactive-klaviyo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. th3mouk/reactive-klaviyo

ActiveLibrary[HTTP &amp; Networking](/categories/http)

th3mouk/reactive-klaviyo
========================

PHP client to send Klaviyo events with Reactive Programming paradigm

1.1.0(6y ago)0172MITPHPPHP ^7.3

Since Jun 5Pushed 6y agoCompare

[ Source](https://github.com/Th3Mouk/reactive-klaviyo)[ Packagist](https://packagist.org/packages/th3mouk/reactive-klaviyo)[ RSS](/packages/th3mouk-reactive-klaviyo/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

Klaviyo HttpClient
==================

[](#klaviyo-httpclient)

This PHP library provide a simple way to send events to Klaviyo API. This implementation is based on an asynch [HttpClient](https://github.com/Rxnet/http-client)that use [Reactive Programming](https://github.com/ReactiveX/RxPHP) paradigm.

[![Latest Stable Version](https://camo.githubusercontent.com/c96d6cf909e1e66057e26e525e28acc8bfa04a03805bc81e8533b20132ac34e3/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f72656163746976652d6b6c617669796f2f762f737461626c65)](https://packagist.org/packages/th3mouk/reactive-klaviyo)[![Latest Unstable Version](https://camo.githubusercontent.com/45269f621165698f5c948c82dec29100b43ef32769931b05bcddedb96f6c2f12/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f72656163746976652d6b6c617669796f2f762f756e737461626c65)](https://packagist.org/packages/th3mouk/reactive-klaviyo)[![Total Downloads](https://camo.githubusercontent.com/33cdc9fadf47a0e407a92e369373e57acfed9ecdda4348d07dd9b9991329227c/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f72656163746976652d6b6c617669796f2f646f776e6c6f616473)](https://packagist.org/packages/th3mouk/reactive-klaviyo)[![License](https://camo.githubusercontent.com/c679afb47b91aa886b35c15bcf069e4720ead534b115acce4d9ad85bae144906/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f72656163746976652d6b6c617669796f2f6c6963656e7365)](https://packagist.org/packages/th3mouk/reactive-klaviyo)

[![Build Status](https://camo.githubusercontent.com/1235f69c428923913f270c7b4bce35ecfe58a93840d349fb1b2fb771327e9710/68747470733a2f2f7472617669732d63692e6f72672f7468336d6f756b2f72656163746976652d6b6c617669796f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/th3mouk/reactive-klaviyo)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/72a1e8e251d6cb8397ec925748ada6ad803e1ec57db83069846a7d6d24c080cb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7468336d6f756b2f72656163746976652d6b6c617669796f2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/th3mouk/reactive-klaviyo/?branch=master)

Installation
------------

[](#installation)

`composer require th3mouk/reactive-klaviyo`

Basic usage
-----------

[](#basic-usage)

### Create an instance of HttpClient

[](#create-an-instance-of-httpclient)

```
use Clue\React\Buzz\Browser as ClueBrowser;
use Rxnet\HttpClient\Browser as RxBrowser;

$clue = new ClueBrowser(EventLoop::getLoop());
$httpClient = new RxBrowser($clue);
```

### Instantiate Klaviyo Client

[](#instantiate-klaviyo-client)

```
$client = new Client('klaviyo-api-token', $httpClient);
```

### Create a payload

[](#create-a-payload)

According to [Klaviyo documentation](https://www.klaviyo.com/docs), the payload must be base64 encoded. This library use fluent setters to ease its creation and enforce typing with a `Property` class.

```
$payload = Payload::create('event-name')
    ->addCustomerProperty(Property::create('$email', 'polo@klaviyo.com'))
    ->addCustomerProperty(Property::create('$id', 'uuid-or-whatever'))
    ->addProperty(Property::create('lang', 'fr'))
    ->addProperty(Property::create('amount', 56))
    ->definePastEventDate(1559722012)
;
```

### Send

[](#send)

Two methods are available, the same that in documentation.

```
$client->track(Payload $payload)
$client->trackOnce(Payload $payload)
```

Please
------

[](#please)

Feel free to improve this library.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Total

3

Last Release

2352d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f31e3a808a4f015ebad005caa64866fc90e39475151fc95ef1e11f774d35505?d=identicon)[Th3Mouk](/maintainers/Th3Mouk)

---

Top Contributors

[![Th3Mouk](https://avatars.githubusercontent.com/u/5006899?v=4)](https://github.com/Th3Mouk "Th3Mouk (4 commits)")

---

Tags

api-clienthttp-clientklaviyoreactive-programmingrxphp

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/th3mouk-reactive-klaviyo/health.svg)

```
[![Health](https://phpackages.com/badges/th3mouk-reactive-klaviyo/health.svg)](https://phpackages.com/packages/th3mouk-reactive-klaviyo)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
