PHPackages                             infinario/infinario - 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. infinario/infinario

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

infinario/infinario
===================

Infinario PHP SDK

v1.1.0(10y ago)1368.2k↓19.7%3[1 PRs](https://github.com/Infinario/php-sdk/pulls)Apache-2.0PHP

Since Apr 10Pushed 7y ago10 watchersCompare

[ Source](https://github.com/Infinario/php-sdk)[ Packagist](https://packagist.org/packages/infinario/infinario)[ Docs](https://github.com/infinario/php-sdk)[ RSS](/packages/infinario-infinario/feed)WikiDiscussions master Synced 4d ago

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

Infinario PHP SDK
=================

[](#infinario-php-sdk)

[![](https://camo.githubusercontent.com/7ce0a609eb3af23e24370a596400f0716e77c4f2212024590784eaed093b6b05/68747470733a2f2f7472617669732d63692e6f72672f496e66696e6172696f2f7068702d73646b2e737667)](https://camo.githubusercontent.com/7ce0a609eb3af23e24370a596400f0716e77c4f2212024590784eaed093b6b05/68747470733a2f2f7472617669732d63692e6f72672f496e66696e6172696f2f7068702d73646b2e737667)

The `\Infinario\Infinario` class provides access to the Infinario PHP tracking API. The SDK requires PHP &gt;= 5.3.2 and php5-curl.

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

[](#installation)

Install the latest version with [Composer](https://getcomposer.org/):

```
composer require infinario/infinario
```

Getting started
---------------

[](#getting-started)

In order to track events, instantiate the class at least with your project token (can be found in Project Management in your Infinario account), for example:

```
use Infinario\Infinario;

$infinario = new Infinario('12345678-90ab-cdef-1234-567890abcdef');                       // PRODUCTION ENVIRONMENT
// $infinario = new Infinario('12345678-90ab-cdef-1234-567890abcdef', ['debug' => true]); // DEVELOPMENT ENVIRONMENT
```

You can also provide a [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)compliant logger interface:

```
$infinario = new Infinario('12345678-90ab-cdef-1234-567890abcdef', ['logger' => $logger]);
```

Timeout for sending data is set to 1000ms you can overwrite it by following option:

```
$infinario = new Infinario('12345678-90ab-cdef-1234-567890abcdef', ['timeout' => 500]);
```

Identifying the customer
------------------------

[](#identifying-the-customer)

When tracking events, you have to specify which customer generated them. This can be either done right when calling the client's constructor.

```
use Infinario\Infinario;

$infinario = new Infinario('12345678-90ab-cdef-1234-567890abcdef', ['customer' => 'john123']);
```

or by calling `identify`.

```
$infinario->identify('john123');
```

Tracking events
---------------

[](#tracking-events)

To track events for the currently selected customer, simply call the `track` method.

```
$infinario->track('purchase');
```

You can also specify an array of event properties to store with the event.

```
$infinario->track('purchase', ['product' => 'bottle', 'amount' => 5]);
```

Updating customer properties
----------------------------

[](#updating-customer-properties)

You can also update information that is stored with a customer.

```
$infinario->update(['first_name' => 'John', 'last_name' => 'Smith']);
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 68.4% 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 ~117 days

Total

3

Last Release

3868d ago

### Community

Maintainers

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

---

Top Contributors

[![ms7s](https://avatars.githubusercontent.com/u/7591391?v=4)](https://github.com/ms7s "ms7s (13 commits)")[![martinstrycek](https://avatars.githubusercontent.com/u/1210763?v=4)](https://github.com/martinstrycek "martinstrycek (3 commits)")[![petee-d](https://avatars.githubusercontent.com/u/7727916?v=4)](https://github.com/petee-d "petee-d (2 commits)")[![danielhrenak](https://avatars.githubusercontent.com/u/6673474?v=4)](https://github.com/danielhrenak "danielhrenak (1 commits)")

---

Tags

eventstrackinganalyticsplayer analytics

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[zumba/amplitude-php

PHP SDK for Amplitude

4110.3M5](/packages/zumba-amplitude-php)[cornford/googlitics

An easy way to integrate Google Analytics with Laravel.

3310.2k](/packages/cornford-googlitics)[axllent/silverstripe-analytics-js

Google Universal Analytics tracking code for Silverstripe

1721.4k](/packages/axllent-silverstripe-analytics-js)[gosquared/php-sdk

1023.8k](/packages/gosquared-php-sdk)

PHPackages © 2026

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