PhpDev.App
matomo-org/matomo-for-wordpress

matomo-org/matomo-for-wordpress

Stars: 112

Forks: 24

Pull Requests: 409

Issues: 443

Watchers: 20

Last Updated: 2023-09-16 23:18:42

Get a fully functioning Matomo Analytics for your WordPress. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Privacy is built-in. 100% data ownership, no one else can see your data. We love Pull Requests!

License: GNU General Public License v3.0

Languages: PHP, JavaScript, Shell, CSS, HTML, Smarty, Less, Twig, TypeScript, Vue

https://matomo.org

Matomo Analytics & Tag Manager for WordPress

Code Status

Build Status Develop Build Status Live

Description

A hassle-free and cost-free web analytics platform for your WordPress which lets you stay in full control with 100% data ownership and user-privacy protection.

This plugin installs a fully functional Matomo within your WordPress. If you already have a working Matomo (either On-Premise or Matomo Cloud), use the WP-Matomo Integration plugin instead. If you have a high traffic website, we recommend using On-Premise or the Cloud-hosted solution for better performance.

Learn more about this plugin in the readme.txt.

License

Matomo is released under the GPL v3 (or later) license, see LICENSE

Get involved!

We believe in liberating Web Analytics, providing a free platform for simple and advanced analytics. Matomo was built by dozens of people like you, and we need your help to make Matomo better… Why not participate in a useful project today? Learn how you can contribute to Matomo.

You can also find more information on our developer website.

Installing Matomo for WordPress for development using git

Make sure the plugin folder in your WordPress is not called matomo-for-wordpress but matomo. When you clone the repository you may directly want to specify the right path like this:

git clone [email protected]:matomo-org/matomo-for-wordpress.git wp-content/plugins/matomo

Install composer

Now run the below command to have phpunit etc available. Requires Composer to be installed.

composer install # or composer.phar install

Local environment through docker

If you have docker and docker-compose installed, you can setup a local development environment with a single command:

docker-compose up wordpress; docker-compose stop

The first time the container starts it will compile php extensions within the container it needs, download wordpress and set it up.

After starting the container, visit https://localhost:3000/ to see the list of available wordpress versions. Pick one, and it will take you to the Wordpress installer.

After installing Wordpress, go to the plugins page and activate Matomo for Wordpress.

Note: docker related files, such as the downloaded wordpress and database files, will be stored in a new folder named ./docker. As long as you are using this local dev environment, you should not delete this folder.

Customizing your local environment

You can customize your local environment by setting environment variables in a .env file. Currently, the following variables are supported:

  • PHP_VERSION - defaults to 8.1, must be a version that has an official docker container available
  • BACKEND - 'mariadb' or 'mysql', defaults to 'mariadb'
  • WORDPRESS_VERSION - defaults to 6.3.1
  • PORT - the port to expose wordpress on, defaults to 3000
  • WP_PLUGINS - a list of plugin/version pairs like "my-plugin my-other-plugin:1.2.3". For each item, wp-cli will attempt to download and activate the plugin. This is the same format as the Active Plugins entry in the System Report, so you could copy that value to this environment variable to quickly (or more quickly) replicate a user's setup.

Accessing MariaDB/MySQL

First ensure the database you want to inspect (mariadb or mysql) is the one that's currently being used by your local environment. Then, while the local environment is running in one shell, open another and run the command:

docker-compose run mariadb mariadb -h mariadb -u root -p

Enter pass for the password.

(For mysql, replace instances of "mariadb" in the command with "mysql".)

Security

Security is a top priority at Matomo. As potential issues are discovered, we validate, patch and release fixes as quickly as we can. We have a security bug bounty program in place that rewards researchers for finding security issues and disclosing them to us.

Learn more or check out our HackerOne program.

Contact

Website: matomo.org

About us: matomo.org/team/

Contact us: matomo.org/contact/

OPEN ISSUES

See all

RELEASES

See all