Giter Club home page Giter Club logo

test-examples's Introduction

Matomo Test Examples

This is a collection of various tests pages that let you test and reproduce various features of Matomo.

It is especially useful for Matomo core developers and Matomo support but also anyone else who wants to test a specific feature.

Installation

This can be hosted either on the same domain as Matomo or on a different domain.

To install it, simply clone this repository using git.

To run this project you only PHP 7.4 or newer.

Configuration

Make a copy of config/config.example.php and save it as config/config.local.php. Adjust any variable as needed.

Variables:

  • matomoUrl - The URL to the Matomo installation. A trailing slash will be removed automatically
  • matomoIdSite - The ID of the site data should be tracked into or data should be requested from
  • matomoTagManagerContainer - The ID of the Tag-Manager container that should be used in the Tag-Manager examples

File Structure

  • tracking/*.php - all tracking related test files are put into this directory. Ideally, features are grouped together when possible like tracking/events/*.php and tracking/content/*.php.
  • consent/*.php - includes consent and opt out related examples
  • consent/consent_manager/*.php - embedding Matomo using popular third-party consent managers
  • tagmanager/*.php

In directory and file names please use an underscore (_) to separate words as it's best to read on the index page this way.

Adding a new page

  • Simply create a new PHP page in the best suited directory (feel free to create a directory if it doesn't exist yet)
  • Put <?php include '../bootstrap.php'; ?> in the beginning to load the config
  • You can then use variables like this: <?php echo $matomoUrl ?>
  • If any possible it be great to start with a leading <h1> element giving the page a title and a <p> element describing what you can test on this page, what you expect to happen when doing something or loading the pag etc.

Viewing a page

Either open the index page of this directory in the browser or directly load a specific filename in the browser.

License

GPL v3 (or later) license, see LICENSE.

test-examples's People

Contributors

tsteur avatar diosmosis avatar findus23 avatar geekdenz avatar flamisz avatar

Stargazers

 avatar

Watchers

 avatar

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.