PHPackages                             castledio/castled-php-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. castledio/castled-php-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

castledio/castled-php-sdk
=========================

Castled PHP Library

v2.0.0(2y ago)112MITPHPPHP ^7.4 || ^8.0

Since Jan 31Pushed 2y agoCompare

[ Source](https://github.com/castledio/castled-php-sdk)[ Packagist](https://packagist.org/packages/castledio/castled-php-sdk)[ Docs](https://castled.io)[ RSS](/packages/castledio-castled-php-sdk/feed)WikiDiscussions master Synced 1mo ago

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

The Castled PHP SDK empowers your PHP-based backend servers to transmit user attributes and events to Castled. This data can serve as triggers for campaigns or workflows, or be synchronized with your data warehouse for advanced customer segmentation. The following steps will guide you through the process of integrating the SDK with your PHP application.

SDK Installation
----------------

[](#sdk-installation)

```
require_once __DIR__ . '/vendor/autoload.php';

composer require castledio/castled-php-sdk
```

SDK Initialisation
------------------

[](#sdk-initialisation)

```
  Castled::init();
```

Track User Attributes
---------------------

[](#track-user-attributes)

```
  Castled::identify([
        'userId' => '12345',
        'traits' => [
            'plan' => 'basic',
            'first_name' => 'John',
            'last_name' => 'Taylor'
        ]
    ]);
```

Track User Events
-----------------

[](#track-user-events)

```
  Castled::track([
        'event' => 'order_status_update',
        'userId' => '12345',
        'properties' => [
            'plan' => 'basic',
            'order_id' => 'o1'
        ]
    ]);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor4

4 contributors hold 50%+ of commits

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 ~0 days

Total

3

Last Release

824d ago

Major Versions

1.9.9 → v2.0.02024-02-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/f60499b1717c143942ff1bfc003d237f47d86a0adbec70f7c7b6ab0ea9520c71?d=identicon)[aruntdharan](/maintainers/aruntdharan)

---

Top Contributors

[![nd4p90x](https://avatars.githubusercontent.com/u/2658588?v=4)](https://github.com/nd4p90x "nd4p90x (109 commits)")[![yields](https://avatars.githubusercontent.com/u/1661587?v=4)](https://github.com/yields "yields (31 commits)")[![dailycoding](https://avatars.githubusercontent.com/u/13878119?v=4)](https://github.com/dailycoding "dailycoding (30 commits)")[![f2prateek](https://avatars.githubusercontent.com/u/843979?v=4)](https://github.com/f2prateek "f2prateek (29 commits)")[![Synchro](https://avatars.githubusercontent.com/u/81561?v=4)](https://github.com/Synchro "Synchro (23 commits)")[![pooyaj](https://avatars.githubusercontent.com/u/2992515?v=4)](https://github.com/pooyaj "pooyaj (23 commits)")[![calvinfo](https://avatars.githubusercontent.com/u/487539?v=4)](https://github.com/calvinfo "calvinfo (22 commits)")[![lubird](https://avatars.githubusercontent.com/u/7109746?v=4)](https://github.com/lubird "lubird (18 commits)")[![brennan](https://avatars.githubusercontent.com/u/11224497?v=4)](https://github.com/brennan "brennan (9 commits)")[![dominicbarnes](https://avatars.githubusercontent.com/u/160197?v=4)](https://github.com/dominicbarnes "dominicbarnes (8 commits)")[![aruntcet2010](https://avatars.githubusercontent.com/u/41280747?v=4)](https://github.com/aruntcet2010 "aruntcet2010 (6 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (6 commits)")[![MindfullyLoko](https://avatars.githubusercontent.com/u/59059891?v=4)](https://github.com/MindfullyLoko "MindfullyLoko (5 commits)")[![MichaelGHSeg](https://avatars.githubusercontent.com/u/101233650?v=4)](https://github.com/MichaelGHSeg "MichaelGHSeg (3 commits)")[![Cethy](https://avatars.githubusercontent.com/u/735030?v=4)](https://github.com/Cethy "Cethy (3 commits)")[![kzap](https://avatars.githubusercontent.com/u/62213?v=4)](https://github.com/kzap "kzap (3 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (2 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (2 commits)")[![inaniyants](https://avatars.githubusercontent.com/u/4038277?v=4)](https://github.com/inaniyants "inaniyants (2 commits)")[![Robertbaelde](https://avatars.githubusercontent.com/u/4356288?v=4)](https://github.com/Robertbaelde "Robertbaelde (2 commits)")

---

Tags

analyticsanalytics.jscastlediocastled

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/castledio-castled-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/castledio-castled-php-sdk/health.svg)](https://phpackages.com/packages/castledio-castled-php-sdk)
```

###  Alternatives

[segmentio/analytics-php

Segment Analytics PHP Library

25621.5M24](/packages/segmentio-analytics-php)[spatie/laravel-analytics

A Laravel package to retrieve Google Analytics data.

3.2k5.7M57](/packages/spatie-laravel-analytics)[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[panphp/pan

A simple, lightweight, and privacy-focused product analytics php package.

1.2k94.6k5](/packages/panphp-pan)[zumba/amplitude-php

PHP SDK for Amplitude

409.5M5](/packages/zumba-amplitude-php)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)

PHPackages © 2026

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