GithubHelp home page GithubHelp logo

schnti / kirby-piwik Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 17 KB

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

License: MIT License

PHP 83.37% JavaScript 16.63%
kirby kirby-plugin piwik piwik-tracking

kirby-piwik's Introduction

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

kirby-piwik's People

Contributors

schnti avatar tim-peters avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kirby-piwik's Issues

Kirby error

Adding this plugin leads to error on Kirby.

Settings

  • Kirby v2.5.12
  • basic StarterKit them for Kirby
  • added tracking code as on readme on snippet footer.php:
<?= piwik(); ?>
</body>
</html>

Error

session_start(): Cannot send session cache limiter - headers already sent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.