<commit_before># Piwik plugin

A plugin for [Kirby 2 CMS](http://getkirby.com) that generates piwik analytics code to use in your templates.

## Installation

Put the `piwik` folder in `/site/plugins`.

Copy or link the `piwik` directory to `site/plugins/` **or** use the [Kirby CLI](https://github.com/getkirby/cli):

```
kirby plugin:install schnti/kirby-piwik
```

### Config Variables

**Tracking**
* ka.piwik.tracking: true / false (Default: false)
* ka.piwik.url: 'stats.yourpage.com'
* ka.piwik.id: 1 (replace with the page ID in your piwik installation)

**Widget**
* ka.piwik.widget: true / false (Default: false)
* ka.piwik.apitoken: Your-Piwik-API Token

```php
c::set('ka.piwik.url', 'stats.yourpage.com');
c::set('ka.piwik.id', 28);<commit_msg>Remove duplicate content.<commit_after># Piwik plugin

A plugin for [Kirby 2 CMS](http://getkirby.com) 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](https://github.com/getkirby/cli):

```
kirby plugin:install schnti/kirby-piwik
```

### Config Variables

**Tracking**
* ka.piwik.tracking: true / false (Default: false)
* ka.piwik.url: 'stats.yourpage.com'
* ka.piwik.id: 1 (replace with the page ID in your piwik installation)

**Widget**
* ka.piwik.widget: true / false (Default: false)
* ka.piwik.apitoken: Your-Piwik-API Token

```php
c::set('ka.piwik.url', 'stats.yourpage.com');
c::set('ka.piwik.id', 28);
{'fraction_non_alphanumeric': 0.1659919028340081, 'fraction_numerical': 0.005398110661268556, 'mean_word_length': 4.6603053435114505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4382190', 'n_tokens_mistral': 555, 'n_tokens_neox': 536, 'n_words': 149}