PHPackages                             dlin/keen-bundle - 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. dlin/keen-bundle

ActiveLibrary

dlin/keen-bundle
================

A Syfmony 2 Bundle for Keen.IO using the office Keen.IO library

v1.0.6(12y ago)154MITPHPPHP &gt;=5.3.8

Since Oct 27Pushed 12y ago1 watchersCompare

[ Source](https://github.com/dlin-me/keen-bundle)[ Packagist](https://packagist.org/packages/dlin/keen-bundle)[ Docs](http://dlin.me)[ RSS](/packages/dlin-keen-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (10)Used By (0)

Dlin Symfony Keen Bundle
========================

[](#dlin-symfony-keen-bundle)

Dlin Keen Bundle is Symfony2 wrapper bundle for the 'Keen.IO' PHP library:

This Keen Bundle provides a configurable service to work with Keen.IO

Version
-------

[](#version)

0.9

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

[](#installation)

Installation using [Composer](http://getcomposer.org/)

Add to your `composer.json`:

```
json
{
    "require" :  {
        "dlin/keen-bundle": "dev-master"
    }
}

```

Enable the bundle in you AppKernel.php

```
public function registerBundles()
{
    $bundles = array(
    ...
    new Dlin\Bundle\KeenBundle\DlinKeenBundle(),
    ...
}

```

Configuration
-------------

[](#configuration)

For example:

```
#app/config/config.yml

dlin_keen:
    project_id: werknskviehraf234slf
    read_key: xxxxxxxxxxx
    write_key: xxxxxxxxx

```

Usage
-----

[](#usage)

Geting the service in a controller

```
$service =  $this->get('dlin.keen_service');

```

Getting the service in a ContainerAwareService

```
$service = $this->container->get('dlin.keen_service');

```

Sending an event to Keen.IO with data

```
$eventCollectionName = "purchases";

$eventData = array('porduct_id'=>1, 'quantity'=>2, 'amount'=>120);

$service->fireEvent($eventCollectionName, $eventData);

```

Sending an event in an OOP way.

```
//create an event object with public properties
$eventObject = new MyPurchaseEvent();
$eventObject->productId = 1;
$eventObject->quantity = 2;
$eventObject->amount = 120;

$service->fireEventObject($eventObject); //this is equivalent to the last fireEvent call

//You can defined your own event class
Class MyPurchaseEvent{

   //Public properties will be send as event data
   public $productId;
   public $quantity;
   public $amount;

   // Procted and private properties are ignored
   protected $customerAddress;
   private $customerGender;

   //By default, the event collection name will be the class name in camelCase (e.g. myPurchaseEvent)
   //You can specify the collection name by defining a public method named 'getCollectionName'
   public function getCollectionName(){
      return 'purchases';
   }

}

```

Sometimes sending event can slow down your page and affect user experience. You can schedule to fire an event only after theh current script finish execution. This avoids slowing down the page loading.

```
...
$service->scheduleEventObject($eventObject);
$service->scheduleEvent('event_collection_name', array('data'=>123));
...

//You can get scheduled events using collection name
$service->getScheduledEvent('event_collection_name');

//You can also cancel schedule events by event collection name
$service->cancelScheduledEvents('event_collection_name');

```

License
-------

[](#license)

MIT

*Free Software, Yeah!*

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

9

Last Release

4544d ago

Major Versions

0.9.8 → 1.02013-10-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1905715?v=4)[David Lin](/maintainers/dlin-me)[@dlin-me](https://github.com/dlin-me)

---

Top Contributors

[![david-lin-au](https://avatars.githubusercontent.com/u/16718785?v=4)](https://github.com/david-lin-au "david-lin-au (3 commits)")

---

Tags

symfonykeen.io

### Embed Badge

![Health badge](/badges/dlin-keen-bundle/health.svg)

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

###  Alternatives

[keen-io/keen-io-bundle

Symfony Bundle for Keen IO

16488.5k](/packages/keen-io-keen-io-bundle)[bugsnag/bugsnag-symfony

Official BugSnag notifier for Symfony applications.

453.0M3](/packages/bugsnag-bugsnag-symfony)[maba/webpack-bundle

Bundle to Integrate Webpack to Symfony

123268.2k4](/packages/maba-webpack-bundle)

PHPackages © 2026

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