Domotic and stupid geek stuff

How I Successfully Centralized AdSense, Search Console, and Matomo in Grafana


I wanted to share an advancement that has truly simplified my life when it comes to tracking the performance of my websites. Like many others, I was juggling multiple tools: AdSense for ad revenue, Search Console for SEO, and Matomo for visitor analytics. After constantly switching between these platforms, I decided to centralize all this data into a single Grafana dashboard. Here’s how I did it! Note this is also possible with Google Analytics GA4 instead of Matomo.


Why I Wanted to Centralize Everything in Grafana

If you manage multiple sites, you know how tedious it can be to switch between tools to analyze trends and understand what’s working. My goal was simple: **have a unified and consolidated view** of performance without wasting time.
By combining AdSense, Search Console, and Matomo in Grafana, I was able to:


How I Integrated AdSense, Search Console, and Matomo into Grafana

1. Extracting AdSense Data

I developed a PHP API to automatically retrieve my AdSense statistics using the official API. The key metrics I use are:

This data is then stored in a MySQL database for easier use.
Example of data in Grafana:

Here we have AdSense and Search Console data.

2. Connecting to the Google Search Console API

Next, I integrated the Google Search Console API to track SEO performance. I retrieve data such as:

All this data is also stored in the database, allowing me to analyze trends over multiple periods. You can find the documentation for the Google Search Console API here.

3. Connecting and Using Matomo Data

Since Matomo was already installed to track my visitors, I directly used its database. This allowed me to display statistics such as:

To learn more about Matomo, which in my case replaces Google Analytics, check out this link: Discover Matomo and its advantages (e.g., GDPR compliance).


Setting Up the Grafana Dashboard

Once all this data was collected and stored, I configured an **interactive dashboard** in Grafana. It allows me to:


The Result and What It Brings Me

Thanks to this dashboard, I can **monitor my sites at a glance** and anticipate problems much faster. No more need to open three different tools: everything is visible in one place!

Upcoming Improvements:

If you’d like to set up a similar dashboard or have questions, feel free to share your experience in the comments!


Next Steps: Technical Details

Possibility to add Analytics GA4 and page speed Insight data (using their API).

Each step I mentioned here will be covered in a detailed article with tutorials, code, and screenshots. You’ll be able to easily replicate this system for your own sites. Stay tuned and let me know if you’re interested in this topic!

Exit mobile version