Skip to content

Kirby 2 plugin that generates piwik analytics code to use in your templates.

License

Notifications You must be signed in to change notification settings

schnti/kirby-piwik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matomo plugin

A plugin for Kirby 2 CMS that generates piwik analytics code to use in your templates.

Installation

Copy or link the piwik directory to site/plugins/ or use the Kirby CLI:

kirby plugin:install schnti/kirby-piwik

Config Variables

Tracking

  • ka.piwik.tracking: Boolean (enable tracking, default: false)
  • ka.piwik.trackingIfLoggedIn: Boolean (enable tracking when user is logged in, default: true)
  • ka.piwik.url: String (piwik endpoint)
  • ka.piwik.id: Int (page ID in your piwik installation)

Widget

  • ka.piwik.widget: Boolean (show widget, default: false)
  • ka.piwik.apitoken: String (your piwik API token)

OptOut

  • ka.piwik.language: String (language code, default: de)
c::set('ka.piwik.url', 'https://stats.yourpage.com');
c::set('ka.piwik.id', 28);
c::set('ka.piwik.tracking', true);
c::set('ka.piwik.trackingIfLoggedIn', true);
c::set('ka.piwik.widget', true);
c::set('ka.piwik.apitoken', 'abcdefghijklmnopqrstuvwxyz');
c::set('ka.piwik.language', 'de');

How to use it

Tracking

use this right before closing </body> tag

<?= piwik(); ?>

OptOut

In your text file you can use it as follows:

iFrame

(piwikOptOut:)

You need the Piwik Custom Opt Out Plugin

or

AJAX (Responsive)

(piwikAjaxOptOut:)

You need the Piwik Ajax Opt Out Plugin

About

Kirby 2 plugin that generates piwik analytics code to use in your templates.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published