How to publish your plugin or theme on the Matomo Marketplace – Introducing the Matomo Platform

Contents

This is the next post of our blog series where we introduce the capabilities of the Matomo (Piwik) platform. Over the last weeks we have already introduced you to some of the basics on how to create plugins and themes. This time you’ll learn how to publish a plugin or theme on the Matomo Marketplace to share it with all Matomo users.

What is the Matomo Marketplace?

The Marketplace is a showcase for all plugins and themes that can be used in Matomo. You can browse them either on a standalone website or in Matomo itself by going to Settings => Marketplace. There you can install and update them with just one click. Easy as that! While some of those plugins are provided by Matomo most of them are created and maintained by our community. Everyone is very welcome to distribute plugins or themes on the Marketplace.

Prerequisites

To publish your plugin on the Marketplace you simply need to meet these requirements:

  • The plugin name is not already taken by another plugin
  • The code of the plugin is hosted in a public GitHub repository
  • The GitHub service “Matomo plugins” for this repository is enabled (Repository Settings => Webhooks & Services => Add Service)
  • Push permission for this repository
  • The plugin is free (as in not paid)
  • The license must be compatible with the GNU General Public License v3 or any later version

There is also list of Rules for plugins.

Best practices

Before actually distributing your plugin we recommend to follow a couple of best practices to make sure your plugin looks good on the Marketplace and provides useful information for your future users. If you have used the console to generate a plugin the needed files were already created for you.

Provide a good description

Make sure there is a file named README.md in the root of your plugin. When preparing your plugin for the Marketplace we will search for four sections in this file: Description, FAQ, Changelog and Support. Each of those is optional but it is good practice to provide at least a section Description and Support by prefixing them with ## . Any content of your readme outside of those sections will not be displayed on the Marketplace.

# Matomo Plugin Name

## Description

Add your plugin description here.

## Support

Please direct any feedback to hello@piwik.org. 
If you experience any issues feel free to file an issue at https://github.com/piwik/piwik/issues .

A good example can be seen in the README.md of the CustomAlerts plugin and the related CustomAlerts plugin page.

Provide screenshots

This will improve your appearance in the Marketplace a lot and users will be more likely install your plugin. It is as easy as placing “png” or “jpg” files in a folder named screenshots. The filename of each image will be shown in the UI with underscores replaced by a whitespace. This way you can provide a nice description. Have a look at the CustomAlerts plugin to see how it works.

Provide contact details

Your contact details are specified in the plugin.json file of your plugin root folder. Providing at least one author and a link to your homepage is required. If you do not have a website you can use a link to your GitHub profile. This helps your users contact you in case they want to thank you for your great work or if they have any problem with it. An example plugin.json looks like this:

{
    "name": "MyPluginName",
    "homepage": "https://matomo.org",
    "authors": [
        {
            "name": "Matomo",
            "email": "hello@piwik.org",
            "homepage": "https://matomo.org"
        }
    ],
    "support": {
      "email": "hello@piwik.org",
      "issues": "https://github.com/piwik/piwik/issues",
      "forum": "http://forum.matomo.org",
      "wiki": "https://github.com/piwik/piwik/wiki",
      "irc": "#piwik-dev"
    } 
}

Choose a license

Choosing the right license that works best for you and your users is important. To distribute a plugin via the Matomo Marketplace the license must be compatible with the GNU General Public License v3 or any later version. If you do not specify a license anywhere in your plugin, it is assumed your plugin uses GPLv3 or later. The license must be specified in the plugin.json file using the property license:

{
    "name": "MyPluginName",
    "license": "GPL v3+"
}

Provide donation links

You can define a donation link or email for PayPal, Flattr and Bitcoin in the plugin.json file. Users that love your work will then be able to donate you money directly from the plugin page.

{
    "name": "MyPluginName"
    "donate": {
        "paypal": "sponsor@piwik.org",
        "flattr": "https://flattr.com/profile/piwik",
        "bitcoin": "1234567890"
    }
}

How to publish the first version of your plugin

We are trying to make it as easy as possible for you to publish your plugin on the Marketplace. That’s why we don’t require any logins or packaging. To publish your plugin you only have to create a new tag of your plugin and within a minute your plugin will be ready to be installed on hundreds of thousands of Matomo installations.

To tag your plugin you can use one of the following two suggestions:

Using the command line

git tag 0.1.0 && git push --tags

Where “0.1.0” is the name of the tag. While you can use any tag name it is best practice to use the current version number as defined in the plugin.json file.

Using GitHub UI

To tag a new version via GitHub click on Releases => Draft a new release.

Now you can enter a tag name (version) and press “Publish release” as shown in this screen. That’s it!

How to provide an update for your plugin

To provide an update you only have to increase the version number in the file plugin.json and create another tag as explained in the previous section. Your new Plugin update will be visible on the Marketplace within a minute or so. It might take a bit longer until the update appears in Matomo itself as each Matomo server only checks for updates every few hours.

For a complete list of information go to our Distributing Your Plugin guide in the Matomo Developer Zone.

If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to let us know.

Enjoyed this post?
Join the 160,000+ subscribers who receive the Matomo Newsletter straight to their inbox every month
Get started with Matomo

A powerful web analytics platform that gives you and your business 100% data ownership and user privacy protection.

No credit card required.

Free forever.

Get started with Matomo

A powerful web analytics platform that gives you and your business 100% data ownership and user privacy protection.

No credit card required.

Free forever.