Netwerkstatt\Piwik\Extensions\PiwikExtension
Synopsis
class PiwikExtension
extends Extension
{
- // members
- private static string $piwik_server = '//piwik.foo.com/';
- private static integer $piwik_site_id = 0;
- private static bool $show_on_dev = false;
- private static bool $show_on_test = false;
- private static bool $show_on_live = true;
- private static bool $auto_include = true;
- private static bool $include_in_backend = false;
- private static array $excluded_controllers = ;
- // methods
- public void onAfterInit()
- public void getPiwik()
- public bool autoInclude()
- public bool isBackend()
- public mixed isBlockedController()
Hierarchy
Extends
- SilverStripe\Core\Extension
Tasks
Line | Task |
---|---|
67+ | : get it working ;) |
Members
private
- $auto_include — Netwerkstatt\Piwik\Extensions\bool
- $excluded_controllers
- $include_in_backend — Netwerkstatt\Piwik\Extensions\bool
- $piwik_server — string
- $piwik_site_id — int
- $show_on_dev — Netwerkstatt\Piwik\Extensions\bool
- $show_on_live — Netwerkstatt\Piwik\Extensions\bool
- $show_on_test — Netwerkstatt\Piwik\Extensions\bool
Methods
public
- autoInclude() — Helper function to define if tracking code should be included automatically
- getPiwik() — generates piwik tracking code out of config vars and Piwik.ss template
- isBackend()
- isBlockedController() — Checks if the current controller is in a list of blocked controllers (e.g. dev/build)
- onAfterInit() — includes the piwik tracking code when ContentController initializes...