2017 © Pedro Peláez
 

symfony-bundle customerio-bundle

Integrates customer.io into Symfony

image

dubture/customerio-bundle

Integrates customer.io into Symfony

  • Tuesday, March 31, 2015
  • by pulse00
  • Repository
  • 1 Watchers
  • 2 Stars
  • 10,236 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

customer.io bundle

Build Status Scrutinizer Code Quality, (*1)

Latest Stable Version Total Downloads License, (*2)

Symfony integration for http://customer.io., (*3)

Configuration

Install the bundle using composer and register it in your Kernel., (*4)

Then configure your site_id and api_key:, (*5)

# app/config/config.yml

dubture_customer_io:
  site_id: <YOUR-SITE-ID>
  api_key: <YOUR-API-KEY>

Usage

Customer model

Implement Dubture\CustomerIOBundle\Model\CustomerInterface on your customer domain class., (*6)

Event Tracking / Customer identification


use Dubture\CustomerIOBundle\Event\TrackingEvent; use Dubture\CustomerIOBundle\Event\ActionEvent; /** @var \Symfony\Component\EventDispatcher\EventDispatcher $tracker */ $dispatcher = $this->getContainer()->get('event_dispatcher'); $customer = $someRepo->getCustomer(); // retrieve your customer domain object // send the customer over to customer.io for identification $dispatcher->dispatch(TrackingEvent::IDENTIFY, new TrackingEvent($customer)); // now track a `click` event $dispatcher->dispatch(TrackingEvent::ACTION, new ActionEvent($customer, 'click'));

Webhooks

The bundle comes with a controller which can consume customer.io webhooks., (*7)

To use them, register the routing.xml:, (*8)

# app/config/routing.yml

customerio_hooks:
    resource: "@DubtureCustomerIOBundle/Resources/config/routing.xml"

Now your hook url will be http://your.project.com//__dubture/customerio which you need to configure over at customer.io., (*9)

After doing so, you can listen to webhook events:, (*10)


<service id="acme.webhooklistener" class="Acme\DemoBundle\Listener\WebhookListener"> <tag name="kernel.event_listener" event="customerio.email_clicked" method="onClick" /> </service>

use Dubture\CustomerIOBundle\Event\WebHookEvent; class WebhookListener { public function onClick(WebHookEvent $event) { $this->logger->info('Customer clicked on email with address: ' . $event->getEmail()); } }

The Versions

31/03 2015

dev-master

9999999-dev

Integrates customer.io into Symfony

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robert Gruendler

symfony customer.io customer retention

12/03 2015

0.0.1

0.0.1.0

Integrates customer.io into Symfony

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robert Gruendler

symfony customer.io customer retention