le 02/07/2018 dans Pico CMS #dev#php#Pico CMS#plugin

This blog post is a copy – mainly – of the PicoSimpleStats README.md from its repository on GitHub.

This plugin, for Pico 2, automatically adds javascript tracking code for Google Analytics and/or Matomo (ex-Piwik) to all your website's pages.

It depends on my PicoCookieBAR plugin ( on this blog | on GitHub).


/!\ No matter the way you install the plugin, it's mandatory you name the plugin folder PicoSimpleStats.

Using GIT

Just move to your Pico CMS plugins directory and run:

$ git clone https://github.com/bricebou/PicoSimpleStats.git

and jump to the Configuration section below.


Download the latest zip archive from Github and unzip it inside the plugins/PicoSimpleStats/.


Version 2 of Pico CMS introduces YAML configuration files.
Parameters for the PicoSimpleStats plugin can be inserted into the config/config.yml file or put in a specific .yml file inside the config folder.

PicoSimpleStats.enabled: true
  # Enable Google Analytics
  ga_enable: true
  # Google Analytics tracking ID
  ga_trackid: 'UA-XXXXXXXX-X'
  # Enable Matomo (Piwik)
  matomo_enable: true
  # Matomo URL without 'http' or 'https'
  # for example "//matomo.example.com" or "//example.com/matomo" 
  # check the js tracking code Matomoto produces
  matomo_url: "//matomo.example.com"
  # The Matomo ID of the website to track 
  matomo_id: 1