Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent (and unneeded) use of of javascript for URL generation #28

Open
otheus opened this issue Nov 14, 2019 · 1 comment
Open

Comments

@otheus
Copy link

otheus commented Nov 14, 2019

In the javascript portion, the URL is dynamically generated. This seems rather silly given that in the section, the Image-tracker URL is hard-coded with these values. Simply generate them in PHP.

I also wanted to argue that the prefixing with 'http' or 'https' is obsolete for 15 years, when RFC 1808 was written. It specifies that //pwiki-trackerhost.org/piwik.php will work in any modern web-browser. However, this is not true for emailed or saved HTML pages. A page that is viewed in Outlook will not have a protocol context. Thus, the image-tracker should probably always use a configured or configurable fallback.

@gruniversal
Copy link

The current code expects matomo to run on the same webserver. This might not be the case so figuring out the protocol in php or js might give a wrong answer. Maybe it is easier to just define a complete URL instead of one without protocol.

That's what I would expect from $wgMatomoURL anyway, since it's called "URL" which includes a protocol.

The dynamic protocol version in the original code is only necessary when we don't know, which protocol is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants