Download the PHP package sylvainjule/matomo without Composer

On this page you can find all versions of the php package sylvainjule/matomo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package matomo

Kirby Matomo

This plugin helps you generate a tracking code for Matomo, and displays some useful metrics directly within the panel.

screenshot-dashboard-faded


Overview

This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, please consider making a donation of your choice.

TLDR – Just get me started 👀

  1. Install Matomo on your server.
  2. Download and copy this repository to
  3. Set the following values in site/config/config.php :

  4. Add this code to your footer snippet: ``
  5. Visit the Matomo panel area or copy this blueprint under a dedicated tab / page in the panel.

You're all set.


1. Why Matomo?


2. Installation

Kirby 3: up to 1.0.7 Kirby 4: 2.0.0+

Download and copy this repository to

Alternatively, you can install it with composer:


3. Options

Here is an overview of the available options with their default values:

3.1. url (required)

Where your matomo install is:

3.2. id (required)

A single Matomo install can host multiple websites. The plugin needs to know the id of the one to look for:

3.3. token (required for the panel integration)

The panel sections will need to make calls to your Matomo API. A token_auth is required, you will find it in Settings > API in the control panel. Copy-paste the string without the &token_auth= prefix.

Below is an example token. Please note that this token is private and shouldn't be made public. Once added, if you need to publish your code please create something like a duplicated config.github.php which will contain the non-sensitive informations, and add your real config.php to your .gitignore.

3.4. active

You can deactivate the snippet by setting this value to false.

3.5. blacklist

Localhost is in the blacklist as default. You can change it.

3.6. trackUsers

The script is only active for not logged in users by default. If you want to change it, set this option to true.

3.7. debug

If you want to always run the script (even on localhost or if you are logged in), set this option to true.

3.8. disableCookies

If you want to use Matomo without any tracking cookies on the user side, set this option to true. You can read more about this setting in the Matomo FAQ.

3.9. basicAuth

If your Matomo instance is additionally secured by Basic Authentication, you can configure these credentials in the format USERNAME:PASSWORD.

3.11. area

If you want to hide the Matomo Panel area, set this option to false.

3.11. area.label

If you want to change the label for the Matomo Panel area (displayed in the menu and the breacrumb), you can configure it:

3.12. label

If you also want to change the headline for the Matomo Panel area, you can set it with the area.headline option. If not specified, the label will be used as fallback.


4. Template usage

You only need to include the snippet in your code somewhere:


5. Panel display: Area

The panel area displays metrics for the whole website. It is available at the { site.url }/panel/matomo route. Alternatively, you can configure it in a custom tab / blueprint (see below). In such a case, you might want to disable the area completely:

You can also customize its title with the area.label option:


6. Panel display: Sections

The panel dashboard can be configured in a custom tab / blueprint with sections.

6.1. Basic blueprint example

Please make sure that you have included your token_auth in your config.

Place this snippet in a dedicated tab / blueprint:

6.2. Options

Hiding components

There are a bunch of options to help you adjust this default panel view. Both sections have three components :

You can chose to hide them like this:

(Ok, there would be nothing left to work with here, but you get the idea).

Hiding and sorting widgets

Widgets can be sorted to your taste. You can also choose to display only some of them. Here's a glimpse of the option with all widgets explicitely set, change the order of its list or remove entries to filter widgets.

Hiding period ranges

By default, all 4 ranges are displayed (This year, This month, Last 7 days, Today). You can choose to hide some of them by explicitely excluding them from the periods list:

Changing defaults

You have acces to two default options, the period and the widgets limit.

6.3. Complete blueprint example

Here's a glimpse of how the blueprint might look with all options explicitely set:


7. Panel page widget

The panel page widget displays metrics for a given page, both in single-language or multi-language websites.

Any feedback regarding this widget's behaviour is welcome. It might still need to be refined, inputs from a larger variety of live websites would be a great help. Check the potential pitfalls below.

screenshot-page

7.1. Basic blueprint example

Please make sure that you have included your token_auth in your config.

Place this snippet in your page blueprint:

The section will automatically detect the page uri, and fetch its metrics for the given period.

7.2. Options

Period

You can choose the period displayed, which can either be year, month, week or day. Default is month.

Multi-language overview

The plugin will automatically detect if multi-language is switched on, and fetch the metrics of the current language.

Optionally, you can also display the metrics of all languages combined with the overview option. Default is false.

7.3. Potential pitfalls


8. License

MIT


9. Credits

Kirby 2 had some Piwik integration plugins:

The snippet integration has been shamelessly adapted from @jenstornell's kirby-ga. 👏


All versions of matomo with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sylvainjule/matomo contains the following files

Loading the files please wait ....