Symfony Mouse Tracker
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Controller
DependencyInjection
Entity
Repository
Resources
Services
.gitattributes
.gitignore
.travis.yml
README.md
TrackerBundle.php
composer.json
vendor.yml

README.md

MouseTrackerBundle (mouseflow)#

By D'Ali Ben Macha contact@benmacha.tn https://dali.benmacha.tn

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

Add the benmacha/mousetracker package to your require section in the composer.json file.

$ composer require benmacha/mousetracker dev-master

Add the MouseTrackerBundle to your application's kernel:

<?php
public function registerBundles()
{
    $bundles = array(
        // ...
        new benmacha\mousetracker\TrackerBundle(),
        // ...
    );
    ...
}

Configure the Tracker in your routing.yml:

mouse_tracker:
    resource: "@TrackerBundle/Controller/"
    type:     annotation
    prefix:   /tracker

Configure the Tracker in your config.yml:

imports:
    - { resource: "@TrackerBundle/Resources/config/services.yml" }

twig:
    globals:
        mousetrackerService: @twig_tracker
        
assetic:
    filters:
        scssphp:
            formatter: 'Leafo\ScssPhp\Formatter\Compressed'
        jsqueeze: ~

Create Table:

$ php app/console doctrine:schema:update --force

Dump js and css file

$ php app/console assetic:dump

Usage

Configure the TrackerService before the end of Body tag in your *.html.twig page:

<script>
    /*
	Javascript Code 
	*/
</script>

{{ mousetrackerService.build() }}

<script>
    /*
	Javascript Code 
	*/
</script>
</body>
</html>