Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shapecode/piwik-bundle
https://github.com/shapecode/piwik-bundle
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/shapecode/piwik-bundle
- Owner: shapecode
- License: mit
- Created: 2017-07-24T12:44:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-24T13:59:50.000Z (over 7 years ago)
- Last Synced: 2024-09-30T17:21:42.639Z (about 1 month ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ShapecodePiwikBundle
============A Symfony2 Bundle that helps you to use the Piwik Open Analytics Platform with your project.
It contains a Twig function that can insert the tracking code into your website. Plus, you can turn it off with a simple configuration switch so you don't track your dev environment.
Installation
------------
Simply add the following to your composer.json (see http://getcomposer.org/):```json
"require": {
"shapecode/piwik-bundle": "~1.0"
}
```And enable the bundle in `app/AppKernel.php`:
```php
` tag, insert```twig
{{ piwik() }}
```
This will add the appropriate Piwik tracking code as [described in the API reference](http://developer.piwik.org/api-reference/tracking-javascript#where-can-i-find-the-piwik-tracking-code).You have the ability to change the config on the fly if it necessary
```twig
{{ piwik({
site_id: 1,
host_name: 'my.piwik.hostname'
host_path: '/sub_directory/',
no_script_tracking: false
}) }}
```Configuration
-------------
You can configure the bundle in your `config.yml`. Full Example:```yaml
shapecode_piwik:
site_id: 1 # required, no default. site id from piwik tool
disabled: %kernel.debug% # not required, default %kernel.debug%. Usually, you only want to include the tracking code in a production environment
host_name: my.piwik.hostname # required. no default. Hostname to the piwik instance.
host_path: "/sub_directory/" # not required, default null. Path to the tracking script on the host.
no_script_tracking: true # not required, default true. Enables Image-Tracking if JavaScript is disabeld.
```Credits, Copyright and License
------------------------------
Copyright 2017 shapecode. Code released under [the MIT license](LICENSE).Original script from