How to Connect Matomo to Tableau

Cody Schneider8 min read

Connecting your Matomo analytics data to Tableau opens up a new world of reporting possibilities, allowing you to build richer, more interactive dashboards than you can create within Matomo alone. If you're ready to combine your web analytics with other business data, this guide will walk you through the most effective ways to make it happen. We’ll cover everything from using the Matomo API to simpler manual exports.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Connect Matomo to Tableau?

Before we jump into the "how," let's quickly cover the "why." While Matomo provides a powerful and privacy-friendly web analytics platform, sending that data to a dedicated business intelligence tool like Tableau has some serious advantages:

  • Unified Dashboards: Blend your website traffic data from Matomo with data from other sources like your CRM (Salesforce, HubSpot), sales platform (Shopify), or ad networks (Google Ads, Facebook Ads). This lets you see the full picture, from ad click to website visit to final sale, all in one place.
  • Advanced Visualizations: Tableau is a powerhouse for data visualization. You can create highly customized charts, graphs, maps, and interactive dashboards that go far beyond standard web analytics reports.
  • Deeper Analysis: With your data in Tableau, you can use powerful calculated fields, parameters, and table calculations to slice and dice your information in ways that aren't possible within the Matomo interface. This helps you uncover deeper insights and trends.
  • Easy Sharing and Collaboration: Tableau dashboards are built for sharing with stakeholders, your team, or clients. You can publish them to Tableau Server or Tableau Cloud, empowering others to explore the data for themselves in a controlled environment.

Understanding Your Connection Options

There is no official, one-click Matomo connector for Tableau, so you'll need to use one of a few different methods to bridge the gap. Each has its pros and cons depending on your technical comfort level and how frequently you need to refresh your data.

  1. Using the Matomo Reporting API with a Web Data Connector (WDC): This is the most flexible and scalable method for creating a live, or near-live, data connection. It involves telling Tableau how to request data from Matomo’s powerful API.
  2. Manual CSV/TSV Export: This is the simplest method. You export a specific report from Matomo as a flat file (like a CSV) and then connect to that file in Tableau. It’s great for one-off analyses but requires manual work to update.
  3. Direct Database Connection: If you self-host Matomo, you can connect Tableau directly to the underlying MySQL or MariaDB database. This is a highly advanced method that offers an incredible amount of power but requires technical expertise and an understanding of the Matomo database schema.
  4. Using a Middleware / ETL Tool: Platforms like Fivetran, Stitch, or even Zapier can act as intermediaries. They can be configured to pull data from the Matomo API on a schedule and push it into a database or data warehouse that Tableau can easily connect to. This balances automation with ease of setup but often involves another subscription cost.

For this guide, we'll focus on the two most common and accessible methods: using the API with a Web Data Connector and the manual export.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 1: Using the Matomo API and a Web Data Connector (WDC)

The Matomo Reporting API allows you to pull almost any data report programmatically. Tableau's Web Data Connector (WDC) is a feature that enables you to connect to data from any web API endpoint. By combining them, you can build a stable, refreshable link between the two platforms.

Step 1: Locate Your Matomo Authentication Token

First, you need an authentication token to securely prove to the Matomo API that you have permission to access the data. Think of it as a password for your data.

  • Log in to your Matomo account.
  • Click the gear icon (Settings) in the top right menu.
  • In the left-hand navigation, go to Personal > Security.
  • Under the "Auth Tokens" section, you can create a new token. Give it a descriptive name (e.g., "Tableau Connector") and click “Create new token”.
  • Copy this token immediately and store it somewhere safe. You'll need it in the next step.

Step 2: Construct Your API Request URL

Next, you need to build a specific URL that tells the Matomo API exactly what data you want. A Matomo API URL is pieced together with several parameters. Here is a basic structure:

https://your-matomo-domain.com/index.php?module=API&method=VisitsSummary.get&idSite=1&period=day&date=last30&format=json&token_auth=YOUR_TOKEN_HERE

Let's break that down:

  • your-matomo-domain.com: Replace this with your Matomo installation's URL.
  • module=API: This tells Matomo you're making an API call.
  • method=VisitsSummary.get: This is the specific report you want. VisitsSummary.get fetches general stats like visits, unique visitors, and page views. You can find hundreds of other methods in the official Matomo Reporting API documentation. A common one is Actions.getPageUrls to get data on your top pages.
  • idSite=1: This is the ID of the website property in Matomo you want data from. You can find this in your Matomo settings.
  • period=day: The time increment for the data (e.g., day, week, month).
  • date=last30: The date range. You can use relative terms like last30, today, yesterday or specific dates like 2023-10-26.
  • format=json: Defines the data output format. JSON and CSV are common options that work well with Tableau.
  • token_auth=YOUR_TOKEN_HERE: This is where you paste the authentication token you copied in Step 1.

Test your URL by pasting it into your web browser. You should see a machine-readable data output if everything is correct.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 3: Connect to the Data in Tableau with a WDC

Tableau doesn't natively speak "Matomo API," so you need a translator - a Web Data Connector. Tableau hosts a list of community-built WDCs, and you may find one specifically for generic JSON or API connections. For this example, let's assume you've found a generic JSON WDC.

  1. Open Tableau Desktop.
  2. On the startup screen, under "Connect," select Web Data Connector. If it's not visible, click on "More Servers..." to find it.
  3. A dialog box will appear asking for the URL of a WDC. You'll paste the link to your chosen community WDC here.
  4. The WDC’s interface will now load. It will typically have a field where you can paste your full Matomo API URL that you built in Step 2. Paste it in.
  5. Click "Get Data" or a similar button within the WDC's interface.
  6. The WDC will call the Matomo API, parse the response, and present the data structure to Tableau. You'll see a list of tables and columns.
  7. Once the data loads, you can click "Go to Worksheet" and start building your visualizations!

Remember, when you publish this workbook to Tableau Cloud or Server, you can set a refresh schedule to automatically pull the latest data from Matomo on a daily or hourly basis.

Method 2: The Quick Manual Export Method

If you just need to do a one-time analysis or a quick visualization, the manual export and import method is fast and straightforward.

Step 1: Export a Report from Matomo

  • Log in to Matomo and navigate to the report you want to analyze.
  • At the bottom of the data table for that report, look for an "Export" icon or link.
  • Choose your preferred format. CSV or TSV are generally the best options for Tableau.
  • Your browser will download the file to your computer.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 2: Connect to the File in Tableau

  • Open Tableau Desktop.
  • On the startup screen, under "Connect," choose the appropriate file type. If you downloaded a CSV or TSV, select Text File.
  • Locate the file you just downloaded from Matomo and open it.
  • Tableau automatically reads the file and shows you a preview of the data. You can adjust data types (e.g., changing a string to a date) on this screen if needed.
  • Click "Go to Worksheet" to start visualizing.

The major downside: This is a static snapshot. If the data in Matomo changes, your Tableau viz won't update. You have to repeat the entire export/import process to get fresh data.

Final Thoughts

Connecting Matomo to Tableau allows you to transform raw web analytics into compelling, shareable insights. Whether you choose the automated power of the API method for live dashboards or the simplicity of a manual export for a quick analysis, you're unlocking a much deeper level of understanding of your website's performance by blending it with your broader business context.

The process of setting up APIs, managing data pipelines, and configuring dashboards can feel overwhelming - it's exactly why we built Graphed. We wanted to eliminate the technical hurdles that prevent teams from using their data effectively. By connecting your data sources in seconds and using simple, natural language to ask questions, you can instantly create charts, reports, and real-time dashboards without needing to become a data engineer. This approach skips the manual busywork and gets you straight to the insights you need.

Related Articles