zazama/matomo

Silverstripe Matomo module to include tracking code

Installs: 54

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

2.0.0 2020-07-20 15:22 UTC

This package is auto-updated.

Last update: 2022-05-20 19:18:38 UTC


README

Requirements

  • Silverstripe 4

For Silverstripe 3, switch to branch 1

Installation

composer require zazama/matomo ^2.0

Usage

This module provides multiple options that you can use in your _config.yml

Basic config

Zazama\Matomo\Extensions\MatomoExtension:
  # Root URL of your Matomo instance
  server_url: 'https://example.com/'
  # Site ID of the page you want to track
  site_id: 1337

All settings

Zazama\Matomo\Extensions\MatomoExtension:
  # Root URL of your Matomo instance
  server_url: 'https://example.com/'
  # Site ID of the page you want to track
  site_id: 1337
  # Path of the tracker php file, default: matomo.php
  tracker_path: 'matomo.php'
  # Path of the tracker php file, default: matomo.js
  script_path: 'matomo.js'
  # Inserted on dev mode, default: false
  show_on_dev: false
  # Automatically insert script, default: true
  insert_tracking_code: true
  # Enable link tracking (e.g. PWA), default: false
  enable_link_tracking: false
  # Track all content impressions, default: false
  track_all_content_impressions: false
  # Track visible content impressions, default: false
  track_visible_content_impressions: false
  # Disable cookies (GDPR compliance), default: false
  disable_cookies: false
  # Set document title by javascript, default: document.title
  document_title_js: 'document.title'