2017 © Pedro Peláez
 

library pulse-bundle

Basic analytics event tracking in Symfony

image

prezent/pulse-bundle

Basic analytics event tracking in Symfony

  • Tuesday, November 29, 2016
  • by prezent
  • Repository
  • 4 Watchers
  • 0 Stars
  • 333 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

prezent/pulse-bundle

Basic analytics event tracking in Symfony, (*1)

The full documentation can be found in Resources/doc, (*2)

Quickstart example

namespace AppBundle\Controller;

use Prezent\PulseBundle\Event\PulseEvent;
use Prezent\PulseBundle\Query\Query;
use Symfony\Bundle\FrameworkBundle\Controller\Controller

class AppController extends Controller
{
    public function trackableAction()
    {
        $this->get('event_dispatcher')->dispatch(PulseEvent::EVENT, new PulseEvent('some.action', [
            'user' => $this->getUser()->getId(),
        ]));
    }

    public function analyticsAction()
    {
        $query = new Query();
        $query
            ->setTypes(['some.action', 'other.action'])
            ->setStartDate(new \DateTime('-7 days'))
            ->setEndDate(new \DateTime())
        ;

        return $this->render('AppBundle:App:analytics.html.twig', [
            'result' => $this->get('prezent_pulse.repository')->query($query),
        ]);
    }
}
{% extends '::base.html.twig' %}

{% block body %}


{% for column in result.columns %} {% endfor %} {% for row in result %} {% for value in row %} {% endfor %} {% endfor %} {% for value in result.columnTotals %} {% endfor %}
{{ column }}Total
{{ row.key }}: {{ row.id }}{{ value }}{{ row.total }}
Total{{ value }}{{ result.total }}
{% endblock %}

The Versions

29/11 2016

dev-master

9999999-dev http://www.prezent.nl

Basic analytics event tracking in Symfony

  Sources   Download

MIT

The Requires

 

by Prezent Internet B.V.

analytics events tracking

29/11 2016

0.1.1

0.1.1.0 http://www.prezent.nl

Basic analytics event tracking in Symfony

  Sources   Download

MIT

The Requires

 

by Prezent Internet B.V.

analytics events tracking

29/11 2016

0.1.0

0.1.0.0 http://www.prezent.nl

Basic analytics event tracking in Symfony

  Sources   Download

MIT

The Requires

 

by Prezent Internet B.V.

analytics events tracking