How should multilingual Hindi and Marathi text be handled in web analytics?

I’m working with websites that contain Hindi and Marathi content, and I’m curious about the best way to handle multilingual text from an analytics perspective.

Since modern websites generally use Unicode, is there anything specific to consider when tracking URLs, page titles, search terms or custom dimensions containing Devanagari characters in Matomo?

Are there any encoding or UTF-8/UTF-8mb4 considerations that developers should be aware of when working with Indian-language content?

Matomo can track Hindi and Marathi content using Devanagari characters, and in most cases you shouldn’t need any special configuration as long as your website is using UTF-8 correctly.

This applies to values such as:

  • Page titles

  • Site search keywords

  • Event names

  • Custom Dimension values

  • Other text values sent through the tracker

For URLs, there is one additional consideration. Browsers encode non-Latin characters in URLs using percent encoding. For example, a readable Devanagari URL may appear in the tracking request in its encoded form. Matomo handles this, but if you’re creating URL-based conditions or triggers in Matomo Tag Manager, you may need to use the encoded version of the URL in the trigger condition.

If you’re sending data directly using the HTTP Tracking API, string parameters should also be URL encoded and the values should normally be UTF-8.

Regarding UTF-8 vs UTF-8mb4, this is mainly a consideration for self-hosted Matomo installations. Matomo supports utf8mb4, which allows the database to store the full range of Unicode characters, including four-byte characters such as emoji and less commonly used characters.

If you’re using Matomo Cloud, the database configuration is managed by us, so this isn’t something you need to configure yourself.

Overall, for Hindi and Marathi content I would recommend ensuring your website consistently uses UTF-8 and then testing a few examples of Devanagari page titles, URLs, search terms and Custom Dimensions to confirm they’re appearing as expected in your Matomo reports.

Thanks, Jason. That clarifies the UTF-8/UTF-8mb4 distinction and the URL encoding part.

One thing I was also wondering about is older Hindi/Marathi content created with legacy font systems such as Shree Lipi as on this ( unicodetoshreelipi.c ). If that content is converted to Unicode before being published on a website, then Matomo should essentially see it as normal Unicode text, correct?

I’m mainly interested in the difference between the legacy-font workflow and the modern Unicode workflow when tracking multilingual content.

Can confirm this from the Urdu side — I run a small Urdu-language site and Matomo handles the Perso-Arabic script fine as long as everything is UTF-8 end to end, just like Jason said. The one thing that caught me out early on was URL slugs: Urdu titles get percent-encoded into those long %D8%A7 strings in the Pages report, which makes the report hard to scan at a glance. Switching to the page title column instead of the URL fixed it for me. Otherwise non-Latin scripts have been a non-issue.

Scott Aerators’ team would agree that UTF-8 support is essential when working with multilingual websites. Hindi, Marathi, Urdu, and other non-Latin scripts should generally be handled well, but using page titles instead of encoded URL slugs can make analytics reports much easier to read and analyze.

Thanks, Jason.
Its Also Helpful to me. One thing more,

That clarifies the UTF-8/UTF-8mb4 and URL-encoding side.

One additional case I’m interested in is older Hindi/Marathi content that was originally created with legacy font systems rather than Unicode. In that situation, the important step is converting the underlying character mapping to Unicode before publishing, rather than simply changing the font.

Once the content is properly converted to Unicode, Matomo should essentially handle the resulting Devanagari text like other UTF-8 content, including page titles, search terms and Custom Dimensions.

This distinction between Unicode and legacy Hindi fonts is also useful when moving older DTP content into modern web workflows: as on unicodetoshreelipi..com