matomo-org / matomo-for-wordpress

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!
https://matomo.org
GNU General Public License v3.0
119 stars 25 forks source link

Support WP CLI #1

Open tsteur opened 4 years ago

tsteur commented 4 years ago

We already have a CLI command to uninstall WP-Matomo. Eventually it be good if we could expose all Matomo console commands, or at least some of them that may be needed quite often such as invalidating reports. Looked quickly into WP-CLI and doesn't look straight forward to make the Matomo console commands available there.

tsteur commented 4 years ago

Created https://github.com/matomo-org/matomo/pull/15183 which will allow us to bootstrap Matomo within WP-CLI. Before it always failed because WP-CLI was also using Spyc and we were always getting error Cannot declare class Spyc, because the name is already in use.

This means we could eventually support console commands for MultiSite (as they cannot use our console tool) and also be good in general to forward all calls to Matomo console