Not sure why it wasn't done on the whole URL but makes sense I suppose. Original issue was
https://github.com/matomo-org/matomo/issues/7766 and fixed in https://github.com/matomo-org/matomo/pull/8765 . Couldn't find any discussion around this. As it is done in the constructor before data is sanitized it should be fine I presume.
Should we add a test for this (ie, tracking data w/ emojis for example)?
There are some failing tests. not sure if related to this PR? otherwise if they pass lgtm