Custom dimensions - Regex multilingual website

Hello everyone,

I have some difficulty to write down the correct regex for handling multiple languages through custom dimensions.

I have the following URL :
website(dot)com (French language)
website(dot)com/en (English language)
website(dot)com/de (German language)

I followed that article in the FAQ to handle EN and DE pages : https://matomo.org/faq/how-to/how-do-i-track-pages-across-multilingual-sites-or-sites-in-multiple-languages-in-matomo/

However, I also need to handle the FR language. I need to write down a reverse Regex to handle all URL who are not related to EN or DE pages => don’t contain /en, /en/…/de /de/… in the URL.

Anyone has an idea ?

Thank for the support !

You’ll need negative lookahead… https://stackoverflow.com/a/1240365

Though I’m not sure the’re supported by Matomo for that use case, you’ll need to test it out.

1 Like