Coder Social home page Coder Social logo

tim-peters / kirby-piwik Goto Github PK

View Code? Open in Web Editor NEW

This project forked from schnti/kirby-piwik

0.0 2.0 0.0 16 KB

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

License: MIT License

PHP 83.37% JavaScript 16.63%

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

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.