Matomo: Preventing Duplicate Page Tracking

This documentation is part of the Getting Started guide. You can view the complete guide here: Learn how to efficiently set up and use Matomo for your analytics needs..

👋 Welcome to the Stackhero documentation!

Stackhero offers a Matomo cloud solution that simplifies web analytics:

  • Unlimited websites, members, segments, goals, and data retention: analyze everything you need, for as long as you need it.
  • Effortless updates: keep your analytics platform up to date with just one click.
  • Custom domain name with HTTPS: run Matomo on a secure, branded URL, for example https://analytics.your-company.com.
  • High performance and enhanced security: your data is hosted on private, dedicated infrastructure to ensure reliability and confidentiality.

With Stackhero, you can deploy Matomo analytics in just a few minutes and manage all your sites from a single location. Try our Matomo cloud hosting to simplify your analytics and focus on what matters most.

Matomo differentiates between pages like index.html and INDEX.html. If case sensitivity is not crucial for your site, you can normalize URLs by adding the following code to your Matomo JavaScript Tracking tag:

// Add this code:
_paq.push(['setCustomUrl', location.href.toLowerCase()]);
// Just before this line:
// _paq.push(['trackPageView']);

For additional guidance, check out the official Matomo FAQ.