1 Answer

0 votes
by (1.8m points)
 
Best answer

Alright! Let’s break it all down in a vivid, simplified setup guide for running Matomo Analytics with a:

  • VPS (Virtual Private Server)

  • cPanel

  • WordPress (either in a subdomain or subfolder)

  • ✅ Matomo in a way that you track all site activity (but keep full control of data)


PART 1: VPS + cPanel Prep

  1. Get a VPS with:

    • At least 1GB RAM

    • Apache or LiteSpeed

    • PHP 7.4+ or 8.x

    • MySQL/MariaDB

  2. Install cPanel/WHM (you probably already have this).

    • cPanel makes life easier for managing domains, databases, and file uploads.


️ PART 2: Create a Subdomain or Subfolder for Matomo

Choose ONE setup style:

OPTION A: Subdomain

Example: analytics.yourdomain.com

  • Go to cPanel > Subdomains

  • Create analytics.yourdomain.com

  • It creates a new folder: /public_html/analytics

OPTION B: Subfolder

Example: yourdomain.com/analytics

  • You already have a WordPress site in /public_html

  • Just create a folder inside it: /public_html/analytics


PART 3: Install Matomo

1. Download Matomo

Go to: https://matomo.org/download

Unzip and upload it into your chosen folder:

  • /public_html/analytics (subfolder)

  • OR /public_html/analytics.domain.com (subdomain)

You can use cPanel File Manager or FTP (FileZilla).


2. Create a Database

In cPanel > MySQL® Databases:

  • Create a new database: matomo_db

  • Create a new user: matomo_user

  • Assign the user to the database (ALL PRIVILEGES)


⚙️ 3. Visit Matomo in Your Browser

Go to:

  • analytics.yourdomain.com

  • or yourdomain.com/analytics

Matomo will launch the setup wizard:

  • Language: Choose your language

  • System check: Let it run

  • Database config: Use the DB info from above

  • Create super admin: Choose username, password, email

  • Setup site(s) to track

Done!


PART 4: Add Matomo Tracking to WordPress

In WordPress:

✅ Option 1: Use Plugin

Install: Matomo Analytics – Ethical Stats. Powerful Insights.

  • Directly integrates Matomo with your site

  • No code needed

  • Works with your self-hosted Matomo instance (just paste your URL + site ID)

✅ Option 2: Manual Code

  • From Matomo dashboard > Admin > Websites > Tracking Code

  • Copy the JavaScript tracking code

  • Paste it in header.php of your WordPress theme (before </head>) OR

  • Use a plugin like "Insert Headers and Footers"


PART 5: Matomo SEO + Console Features (Optional)

Install the Search Engine Keywords Performance plugin (from Matomo Marketplace):

  • Connect to your Google Search Console account

  • You'll get keyword search reports and clicks/impressions like Search Console!


BONUS: Cookie-less Tracking & GDPR

In Matomo:

  • Go to Privacy > Anonymize Data

    • Enable anonymizing IPs

  • Disable cookies (if you want):

    • Add window._paq.push(['disableCookies']); in the tracking code

This makes Matomo cookie-free and often no consent banner needed!


Result:

  • Matomo live at: analytics.yourdomain.com or yourdomain.com/analytics

  • You track WordPress traffic with full privacy + ownership

  • You can analyze users, sessions, goals, events, campaigns, and more

  • No third-party Google tools involved at all

asked Apr 9 in General by (1.8m points)
closed Apr 9 by
Installing Matomo in WordPress CMS

Related questions

0 votes
1 answer 18 views
0 votes
1 answer 114 views
asked Aug 28, 2024 in General by Zilper
0 votes
1 answer 100 views
0 votes
1 answer 124 views
0 votes
1 answer 110 views
asked Oct 10, 2024 in General by kennedy
0 votes
1 answer 94 views
0 votes
1 answer 162 views
0 votes
1 answer 191 views
0 votes
0 answers 74 views
Welcome to Nestict Research Q&A, where you can ask questions and receive answers from other members of the community.

Before you ask, search the website to make sure your question has not been answered. If you are ready to ask, provide a title about your question and a detailed description of your problem.

...