Matomo: Preventing duplicate page tracking

This documentation is part of the Getting started guide. View the full guide here: Discover how to efficiently set up and utilize Matomo for your analytics requirements..

👋 Welcome to the Stackhero documentation!

Stackhero offers a ready-to-use Matomo cloud solution that provides a host of benefits, including:

  • Unlimited websites, members, segments, goals, and data retention time.
  • Effortless updates with just a click.
  • Customizable domain name secured with HTTPS (for example, https://analytics.your-company.com).
  • Optimal performance and robust security powered by a private and dedicated VM.

Save time and simplify your life: it only takes 5 minutes to try Stackhero's Matomo cloud hosting solution!

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.