Using encoded Page URLs in triggers for non-Latin character URLs
When a website uses non-Latin characters in its URLs, triggers in Matomo Tag Manager based on Page URL conditions may not function as expected. This is because URLs containing non-Latin characters (such as Cyrillic, Chinese, or Arabic) are automatically encoded by the browser into a format it can interpret.
As a result, when setting up Page URL triggers, it’s important to use the encoded version of the URL rather than the readable version with non-Latin characters.
For example, an URL with non-Latin characters https://example.com/测试页面
will be encoded when viewed in the browser https://example.com/%E6%B5%8B%E8%AF%95%E9%A1%B5%E9%9D%A2
-
To ensure your trigger works as expected, copy the encoded URL from the browser and paste it directly into the condition definition when creating the trigger in Matomo Tag Manager.
-
Save the trigger and it will accurately reflect the URL format that tag manager uses after encoding.
By using the encoded URL in your trigger setup, you can avoid errors and ensure compatibility with non-Latin characters across different browsers. It may also be useful to reference an URL encode/decode tool.