When tracking a download/outlink URL it keeps the full URL including protocol but also sets an url_prefix. It should only do one of them but not both. It shouldn't set the url prefix when it keeps the http(s) protocol, or maybe it should remove the http in the action when it sets a url prefix...
This might be a more proper fix but not sure if it would regress anything
For BC I'm not sure if it be better to no longer set url_prefix or to no longer store the protocol. Likely it be easier to not store the url_prefix anymore and set it to
null instead since it should make aggregating the data easier.
Matomo is actually handling it properly but it was an issue in WP Matomo see https://github.com/matomo-org/wp-matomo/issues/160 and https://github.com/matomo-org/wp-matomo/pull/161