Does tracker always use UTF-8?


Piwik tracker uses the get method “?action_name =” to report the page title to Piwik server.
We have different character codes, but no regard is given to these character codes and presuppose use UTF-8, by the look of source codes.
That’s correct or not ? If that’s correct, where these function is written in the piwik.js ?

Thank you for attention.

(Matthieu Aubry) #2

Hi Piwik Japan :slight_smile:

Piwik expects UTF-8 data.

However you can also input the data in another character set using “cs” parameter. Doc: Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

‘cs’ — The charset of the page being tracked. Specify the charset if the data you send to Piwik is encoded in a different character set than the default utf-8.

Currently, looking at the code, this parameter will only be used for the Query String of the URL being tracked.

if you want to send action_name in a new charset, this would require a new feature in Piwik. Please create feature request: Issues · matomo-org/piwik · GitHub


Thank you. And I solved the problem When pk_campaign = (utm_campaign =) is used, which is utf-8, string will cut 70 "bytes" without boundary. · Issue #9257 · matomo-org/piwik · GitHub. But another problem remains. I will show it.