Statistics Dashboard for WordPress Plugin Developers using Metabase (Part 1)

As you may have noticed we created a few WordPress plugins. Some of them are available for free in the WordPress plugin repository and others are sold here on our website or on partner websites.

One thing all plugin and theme developers have in common is reaching for

  • more users
  • confident users
  • good reviews
  • and hopefully some income from their products.

To keep track of these values we can periodically check multiple channels or we can set up our stats once and just enjoy.

Plugin Stats on wordpress.org

The first of these channels for free plugins is the wordpress.org plugins page which gives us three interesting metrics in the sidebar

  • Active installations
  • Ratings
  • Support tickets

When we navigate to the advanced view we additionally get

  • active installations growth
  • and downloads per day

Google Analytics or Matomo

When you also have additional information or premium versions of your plugins on your website your page stats are definitely another important metric.

  • page views
  • unique users
  • conversion rates

I think you already know the numbers which are important to you so I don’t need to describe those in detail.

Plugin Rank

Plugin Rank is really useful service by Iain Poulson to see the ranking of your plugins in the WordPress plugin search for several keywords.

Screenshot of my Plugin Rank Dashboard

It can daily check multiple search terms and create a graph showing your plugins rankings. Next step on the roadmap of the Plugin Rank is a graph of active installation growth as we are going to build one within this blog series.

EasyDigitalDownloads Plugin Sales Stats

There are several good ways to sell your premium versions. Our preferred one is Easy Digital Downloads because it is simple and perfectly optimized for WordPress products. In our store we regularly check the sales stats and sometimes I want to separate the values per language, country or continent.

Easy Digital Downloads Sale Stats

This is the main data source for the financial part of our statistics.

Current PayPal Balance

We use PayPal and Stripe as payment providers for our store. All transactions coming in via Stripe are forwarded to our bank account within a few days. PayPal transaction remain on our PayPal account and we manually pay out the money to our bank account.

In order to keep track of the current balance we regularly log in to the account to have a look.

Just in case your workspace looks like this you can stop reading at this point because you can just keep all the sites mentioned above open at the same time.

If you need a more compact solution keep on reading.

Photo by ThisisEngineering RAEng on Unsplash

OK, let’s automate it

We are developers, why should we do any repetitive task which could be done by a script!?

We are going to set up a dashboard and write some scripts to automatically collect all the values mentioned above.

Set up Metabase Dashboard for you plugin developer stats

We did some research for different dashboard tools.

We wanted

  1. a flexible solution
  2. open source
  3. keep our data on our own infrastructure.
  4. free

The winner was Metabase. The Metabase documentation describes multiple ways of installation. We used the JAR file for about two years but lately we switched our whole infrastructure to a local server using docker.

Running Metabase with docker-compose

If you already use a docker server with docker-compose you can use our configuration file to get started: docker-compose.yml

version: "3.6"
services:

  # watchtower checks for container updates and installs them automatically
  watchtower:
    container_name: watchtower
    restart: always
    image: v2tec/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --schedule "0 0 4 * * *" --cleanup

  metabase:
    container_name: metabase
    image: metabase/metabase
    restart: always
    ports:
      - 9101:3000
    volumes:
      - ${USERDIR}/docker/metabase-data:/metabase-data
    environment:
      - MB_DB_FILE=/metabase-data/metabase.db
      - JAVA_TIMEZONE=${TZ}
      - MUID=${PUID}
      - MB_ENCRYPTION_SECRET_KEY=${MB_ENCRYPTION_SECRET_KEY}

The variables used in this file come from our environment config. If you need help setting up your initial Docker environment you can have a look at this article.

The public port in the example above is 9101, so we can access out Metabase installation from our web browser using http://<server-ip>:9101

We are no Metabase experts we just use it for our own data so please don’t ask any details about the setup, you should find anything you need in the documentation.

Add some data to your dashboard

We did not want to use any blown up software to fetch and aggregate our data. Instead we use some small scripts to fetch the data and write it to a database where we can access and use it for our statistics.

Part 2: Fetch WordPress.org plugin statistics and write to a SQLite database

Part 3: Display WordPress.org data in Metabase from SQLite data source

Update: automatically compute active installations

Part 4: Add Search Ranking to your Dashboard

Part 5: Get your current PayPal balance via API and store in a SQLite database

Part 6: Get EasyDigitalDownloads sales via API to use in your statistics – coming soon

Part 7: Connect Google Analytics and Matomo to show EDD conversion rates in your Metabase dashboard – coming soon