Releases for sf 1.4
| Version |
License |
API |
Released |
|
1.1.1stable
|
MIT license |
1.1.0stable
|
28/02/2012 |
|
1.1.0stable
|
MIT license |
1.1.0stable
|
24/02/2012 |
|
1.0.5stable
|
MIT license |
1.0.5stable
|
27/09/2010 |
|
1.0.4stable
|
MIT license |
1.0.4stable
|
26/08/2010 |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
25/08/2010 |
|
1.0.1stable
|
MIT license |
1.0.1stable
|
12/03/2010 |
Releases for sf 1.3
| Version |
License |
API |
Released |
|
1.0.5stable
|
MIT license |
1.0.5stable
|
27/09/2010 |
|
1.0.4stable
|
MIT license |
1.0.4stable
|
26/08/2010 |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
25/08/2010 |
|
1.0.1stable
|
MIT license |
1.0.1stable
|
12/03/2010 |
Releases for sf 1.2
| Version |
License |
API |
Released |
|
1.0.5stable
|
MIT license |
1.0.5stable
|
27/09/2010 |
|
1.0.4stable
|
MIT license |
1.0.4stable
|
26/08/2010 |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
25/08/2010 |
|
0.3.0beta
|
MIT license |
0.3.0beta
|
22/08/2009 |
|
0.2.0beta
|
MIT license |
0.2.0beta
|
11/08/2009 |
|
0.1.4alpha
|
MIT license |
0.1.4alpha
|
30/07/2009 |
Releases for sf 1.1
| Version |
License |
API |
Released |
|
0.3.0beta
|
MIT license |
0.3.0beta
|
22/08/2009 |
|
0.2.0beta
|
MIT license |
0.2.0beta
|
11/08/2009 |
|
0.1.4alpha
|
MIT license |
0.1.4alpha
|
30/07/2009 |
Changelog for release 0.3.0 - 22/08/2009
- Added parameter "force" that will force the tracker code to be inserted into the response even if the request type restricts it (eg: XHR)
- Added parameter "no_init" which prevents tracker initialization JS code from being inserted in the response
Other releases
Release 1.1.1 - 28/02/2012
- FIX, strict standarts for sfPiwikParameterHolder
Release 1.1.0 - 24/02/2012
- Compliance to piwik 1.7
- Add skip parameter to dynamically skip piwik [setSkip()]
- Add param customUrl [setCustomUrl()]
- Add customVariable handling [addCustomVariable()]
- Add goal tracking [trackGoal()]
- Add link tracking [trackLink()]
- Add param request method [setRequestMethod()]
- Add param link tracking [setEnableLinkTracking()]
- Add getVisitorId() method to get piwik VID when using first party cookies\
- Add various other methods, in accordance with piwik 1.7
- Change configuration parameters internal definition
- Change general parameters internal implementation
- Added new event for dynamic configuration
Release 1.0.5 - 27/09/2010
- basos: fixed pear packaging issue that prevents symfony 1.4.6 from seeing the latest release
Release 1.0.4 - 26/08/2010
- Bug fix for symfony 1.4 support
Release 1.0.3 - 25/08/2010
- Re-introduce symfony 1.2 support
Release 1.0.1 - 12/03/2010
- passbe, vasos: Symfony 1.4 compatibility
Release 0.3.0 - 22/08/2009
- Added parameter "force" that will force the tracker code to be inserted into the response even if the request type restricts it (eg: XHR)
- Added parameter "no_init" which prevents tracker initialization JS code from being inserted in the response
Release 0.2.0 - 11/08/2009
- Bug fix - load javascript helper function before using javascript_tag() in sfPiwikTracker.insert()
Release 0.1.4 - 30/07/2009
- Store custom data as an associative array so that it can be appended to easily
* Broadcast
piwik_plugin.inserting event immediately before inserting tracking code into the request so that listeners can perform any last-minute tracker updates.
Piwik Plugin
A drop-in plugin to add a Piwik tracker to your presentation layer. To use this plugin, you'll
need to have a Piwik server installed and running.
Installation
Install the plugin
symfony plugin:install sfPiwikPlugin -s=beta
Since the plugin is still in alpha mode, the install requires a -s=beta parameter.
Add the sfPiwikFilter to your filter chain in filters.yml
...
# insert your own filters here
sf_piwik_plugin:
class: sfPiwikFilter
...
Configure your app.yml
all:
sf_piwik_plugin:
enabled: on
tracker_url: example.com/piwik/
site_id: 1
Advanced Usage
Module/Action-level Configuration
There are various Piwik attributes that can be set at the module or action level by configuring the
module.yml
file.
all:
sf_piwik_plugin:
params:
# any of the optional params in app.yml can go here
# this configures the entire module
action_name:
sf_piwik_plugin:
params:
# any of the optional params in app.yml can go here
# this configures a specific action within a module
Configurable Parameters
Read the Javascript docs on the Piwik website for further
details on these parameters.
insertion - Position of the tracking code within the HTML <body>. (default=bottom)
custom_data - Any value that will be sent in the data response var. You'd only use this if you've
developed a custom Piwik plugin or are using one that requires this field be set.
document_title - Customize the page name displayed in Piwik.
domains - Consider a host an "alias" host and not record the links to this domain as "outlinks".
download_classes - Set classes to be treated as downloads (in addition to piwik_download).
download_extensions - Set list of file extensions to be recognized as downloads.
ignore_classes - Set classes to be ignored if present in link (in addition to piwik_ignore).
link_classes - Set classes to be treated as outlinks (in addition to piwik_link).
link_tracking_timer - Set delay for link tracking in milliseconds.
enable_link_tracking - Install link tracking on all applicable link elements. (default=on)
campaign_name - Set a campaign name.
campaign_keyword - Set a campaign keyword.
before_tracker_js - Javascript code to be executed immediately before the tracker is invoked.
after_tracker_js - Javascript code to be executed immediately after the tracker is invoked.
force - Forces tracker code to be inserted in the respose even if the request type is "not trackable".
See sfPiwikTracker::isTrackable().
no_init - If true, JS tracker initialization code is not inserted in the response. This is automatically
set to true if the force parameter is on and the current request is XHR.
Accessing the Tracker
At some point, you might want to be able to access the tracker instance from your code to perform some complex
things. Here's how you'd do that:
<?php
class myActions extends sfActions
{
public function executeIndex($request)
{
// get the tracker instance from the context
$tracker = sContext::getInstance()->get(sfPiwikTracker::NAMESPACE);
// you can get or set any of the optional parameters
$tracker->setDocumentTitle("My Title");
}
}
Tracker Events
Just before the tracker writes the Javascript to the response body, it fires an event to notify listeners of the
last chance to modify tracker parameters. The event fired is piwik_filter.inserting.
Read the Events section from the Symfony guide to
understand how events work.