PHPackages                             convertloop/convertloop-php - 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. [API Development](/categories/api)
4. /
5. convertloop/convertloop-php

ActiveLibrary[API Development](/categories/api)

convertloop/convertloop-php
===========================

A PHP client of the ConvertLoop API

0.1.1(7y ago)18.8k↑25%3[1 PRs](https://github.com/germanescobar/convertloop-php/pulls)MITPHPPHP &gt;=5.3.0

Since Dec 16Pushed 7y ago2 watchersCompare

[ Source](https://github.com/germanescobar/convertloop-php)[ Packagist](https://packagist.org/packages/convertloop/convertloop-php)[ RSS](/packages/convertloop-convertloop-php/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (3)Used By (0)

ConvertLoop PHP API Client
==========================

[](#convertloop-php-api-client)

A PHP client of the ConvertLoop REST API. You can sign up for a ConvertLoop account at .

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

[](#installation)

### Requirements

[](#requirements)

PHP 5.3.3 and later.

### Composer

[](#composer)

To install this library using Composer run the following command:

```
composer require convertloop/convertloop-php

```

To use it, use Composer's autoload:

```
require_once('vendor/autoload.php');

```

Getting Started
---------------

[](#getting-started)

First, you need to create an instance of `ConvertLoop\ConvertLoop` class passing your `app_id` and `api_key`:

```
$convertloop = new \ConvertLoop\ConvertLoop("app_id", "api_key", "v1");
```

You are now ready to start calling the API methods:

### Creating or updating a person

[](#creating-or-updating-a-person)

You need to pass at least one of the following: `pid`, `user_id` or `email` to identify a user. Use `pid` when you are updating a guest of your site (you can obtain this value from the cookie `dp_pid`). Use `user_id` to match the `id` of the user in your application.

```
$person = array(
    "email" => "german.escobar@convertloop.co",
    "first_name" => "German",
    "last_name" => "Escobar",
    "plan" => "free"
);
$convertloop->people()->createOrUpdate($person);
```

Any key different to `pid`, `user_id`, `email`, `first_seen_at`, `last_seen_at`, `add_to_segments`, and `remove_from_segments` will be treated as a **custom attribute** of the person.

You can add or remove people from a segment ussing the `add_to_segments` and `remove_from_segments` keys:

```
$person = array(
    "email" => "german.escobar@convertloop.co",
    "add_to_segments" => array("Learn Something"),
    "remove_from_segments" => array("Segment 1")
);
$convertloop->people()->createOrUpdate($person);
```

### Tracking an event

[](#tracking-an-event)

You can track an event for any person:

```
$person = array("email" => "german.escobar@convertloop.co");
$event = array(
    "name" => "Billed",
    "person" => $person,
    "metadata" => array("credits" => 1000),
    "ocurred_at" => time()
);
$convertloop->eventLogs()->send($event);
```

If you don't specify the `ocurred_at` key, the current time will be used. You can use the `person` key to add **custom attributes** to that person, or add or remove that person to/from **segments**.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~596 days

Total

2

Last Release

2889d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/166389?v=4)[German Escobar](/maintainers/germanescobar)[@germanescobar](https://github.com/germanescobar)

---

Top Contributors

[![germanescobar](https://avatars.githubusercontent.com/u/166389?v=4)](https://github.com/germanescobar "germanescobar (8 commits)")[![anayib](https://avatars.githubusercontent.com/u/8997981?v=4)](https://github.com/anayib "anayib (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/convertloop-convertloop-php/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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