2017 © Pedro Peláez
 

symfony-bundle google-analytics-bundle

Add the javascript code for Google Analytics

image

leblanc-simon/google-analytics-bundle

Add the javascript code for Google Analytics

  • Sunday, March 12, 2017
  • by leblanc-simon
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

GoogleAnalyticsBundle

Description

this bundle inject the Google Analytics javascript code when an ID is defined, (*1)

Installation

  • install the bundle
composer require leblanc-simon/google-analytics-bundle
  • activate the bundle
// app/AppKernel.php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
            new LeblancSimon\GoogleAnalyticsBundle\LeblancSimonGoogleAnalyticsBundle(),
        ];
    }
}

Nothing else to do. The HTML will be automatically injected for the text/html response., (*2)

Customization

Configuration

you can customized the bundle with a configuration :, (*3)

leblanc_simon_google_analytics:
    # The ID of the Google Analytics account
    id: Google Analytics ID
    # The template use in the injection
    template: 'LeblancSimonGoogleAnalyticsBundle::google_analytics.html.twig'

or just via parameters.yml (think to add it in the parameters.yml.dist) :, (*4)

google_analytics.id: 'Google Analytics ID'

The Versions

12/03 2017

dev-master

9999999-dev

Add the javascript code for Google Analytics

  Sources   Download

MIT

The Requires

 

12/03 2017

1.0.0

1.0.0.0

Add the javascript code for Google Analytics

  Sources   Download

MIT

The Requires