Giter Site home page Giter Site logo

grav-plugin-matomo's Introduction

Grav Admin Matomo Analytics Plugin

The Matomo Plugin for Grav CMS allows you to integrate and configure Matomo Analytics without the need to touch any code within your Grav site.

Features

  • Access your Matomo data on your Grav Admin Plugin
  • Manage multiple dashboards
  • Use Token Authentication
  • Preload the Matomo Analytics script asynchronously
  • Track Visitors across subdomains
  • Track Users without Javascript
  • Custom Variables support.
  • Client Side "DoNotTrack" detection
  • Disable tracking Cookies
  • Multi-Language Support for the Grav Administration Panel - WORK IN PROGRESS

Installation

Installing the Matomo plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.

GPM Installation (Preferred)

The simplest way to install this plugin is via the Grav Package Manager (GPM) through your system's terminal (also called the command line). From the root of your Grav install type:

bin/gpm install matomo

This will install the Matomo Analytics plugin into your /user/plugins directory within Grav. Its files can be found under /your/site/grav/user/plugins/matomo.

Manual Installation

To install this plugin, just download the zip version of this repository and unzip it under /your/site/grav/user/plugins. Then, rename the folder to matomo. You can find these files on GitHub or via GetGrav.org.

You should now have all the plugin files under

/your/site/grav/user/plugins/matomo

NOTE: This plugin is a modular component for Grav which requires Grav to operate.

Configuration

NOTE: Recommended way of configuration is via The Grav Administration Panel.

Before configuring this plugin, you should copy the user/plugins/matomo/matomo.yaml to user/config/plugins/matomo.yaml and only edit that copy.

Here is the default configuration and an explanation of available options:

enabled: disabled
hosted_url: ""
trackingId: 1
token_auth: ""

track_subdomains: false
prepend_domain: false
hide_alias: false
track_disabled_js: false

track_custom_vars: false
do_not_track: false
disable_tracking_cookies: false
  • enabled Global enable/disable the entire plugin

  • hosted_url The URL where your matomo is hosted on. Use Http:// or Https://. This value is required.

  • trackingId matomo Tracking ID. This value is required.

  • token_auth matomo Token AUTH. This value is required.

  • track_subdomains Track visitors across all subdomains. So if one visitor visits x.example.com and y.example.com, they will be counted as a unique visitor.

  • prepend_domain Prepend the site domain to the page title when tracking. So if someone visits the 'About' page on blog.example.com it will be recorded as 'blog / About'. This is the easiest way to get an overview of your traffic by sub-domain.

  • hide_alias In the "Outlinks" report, hide clicks to known alias URLs of SITE.

  • track_disabled_js Track users with JavaScript disabled.

  • track_custom_vars Track custom variables for this visitor. For example, with variable name 'Type' and value 'Customer'. MAXIMUM 5 Variables.

  • do_not_track Enable client side DoNotTrack detection

  • disable_tracking_cookies: Disables Tracking Cookies.

Usage

NOTE: This plugin assumes you already have matomo hosted somewhere. If you don't have matomo hosted, you can follow this guide to do so Matomo Install Guide.

  1. Access and Login (use a Super User) to your Matomo Installation E.g. http://yourwebsite.com/matomo
  2. Select the Settings menu.
  3. Select Settings on the sidebar menu under Personal
  4. Find your API Authentication Token and take a note of this. You will need it to configure your plugin.
  5. Under Websites > Manage you will see a list of your websites. If you have not yet added your Grav website as a new website, please do so.
  6. Find your Grav Site on the list and make a note of the ID value, you will need this to configure your plugin.
  7. Add API Authentication Token, ID to the configuration of this plugin.
  8. Add the URL of your installation. In this example, http://yourwebsite.com/matomo to the plugin configuration

grav-plugin-matomo's People

Contributors

ricardo118 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

charpy

grav-plugin-matomo's Issues

gpm installation not working

bin/gpm install matomo
This will install the Google Analytics plugin

Unfortunately, it does not.

[user@server]$ bin/gpm install matomo
GPM Releases Configuration: Stable
Nothing to install.

Manual installation works, though.

How to diable js tracking?

The readme lists the option track_disabled_js, but the sourcecode does not use it at all. I guess this functionality is not implemented?

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.