@ryrun opened this Issue on February 27th 2018

We have changed serveral websites to https. All users will be redirected via 301, all urls on our site was changed to https, too. First problem is, that Matomo's visitor log still shows "http" urls, which cant be possible, because the users will be redirected.

It seems this problem is an old one, someone posted it on the forum, too:
https://forum.matomo.org/t/tracking-von-https-in-url-wird-nur-http-angezeigt/22990 (german post)

The second problem is, that we are currently not 100% sure, when we use the "URLs" configuration for websites, that "https" will be also consididerd like the "non-www"/"www", when we have just used "http://www.example.org". There are some missing informations about this. This need to be clarified more.

@mattab commented on September 25th 2018 Member

Hi @ryrun
Thanks for the feedback.

-> can you please set only the HTTPS URLs in your website (in Admin > websites > Manage > edit). Then are the URLs displayed in the visitor log shown for HTTPS links only?

I can't remember exactly the logic but if your website URLs are defined as HTTPS in Matomo, and your users are viewing https page, then for sure it's expected we show HTTPS links in the visitor log.
-> Could you please confirm if it's working for you in Matomo 3.6.0 or not?

The second problem is, that we are currently not 100% sure, when we use the "URLs" configuration for websites, that "https" will be also consididerd like the "non-www"/"www", when we have just used "http://www.example.org". There are some missing informations about this. This need to be clarified more.

Sounds good, we will clarify this in the UI.

Proposed steps to solve the issue

  • Confirm whether linking to HTTPS is partially not working as expected
  • Improve the inline help for definining website URLs and clarify that HTTPS and HTTP don't need to be specified like you don't need to specify with and without www.
@tsteur commented on April 12th 2019 Member

I can't reproduce it. Just debugged and the protocol is used under which is was tracked originally: https://github.com/matomo-org/matomo/blob/3.9.1/plugins/Actions/VisitorDetails.php#L141

It can happen though if an HTTP url was tracked in the past because of this: https://github.com/matomo-org/matomo/blob/3.9.1/core/Tracker/Model.php#L179

We store the action based on a hash of the url but the protocol is ignored in the hash. @mattab explained two months ago or so this was done to not create one action entry for each different protocol and to save storage and improve performance big times. If we were to change this, we would probably need to change a lot of reports too as we would likely need to group by more reports (which may lead in inaccurate results for unique metrics etc and lots of other problems).

We could try to match the domain/path with any URL configured in the site and use the same protocol as configured there instead I suppose. Not sure re possible side effects.

@mattab commented on April 12th 2019 Member

We could try to match the domain/path with any URL configured in the site and use the same protocol as configured there instead I suppose. Not sure re possible side effects.

Nice idea. But maybe this is not really important to fix actually and can be moved out of milestone?

@tsteur commented on April 12th 2019 Member

I couldn't reproduce it, because the action was initially tracked under the right url_prefix.

But if you used to have http, and the url was first tracked under http, and then remove http from your website and only have https, then the link for that url will stay http basically.

@ryrun commented on April 12th 2019

Sorry @mattab i missed your post last year. I've set to https Urls only, but it still shows http://.
When no protocol will be indexed, what about using just "Protocol relative url's"? (https://en.wikipedia.org/wiki/URL#prurl)
Could be abit confusing for the users when they check the url, but as far as i can see Matomo already dont display url protocols.
Could be explained in the FAQ or Manual why Matomo does this.
And maybe you can add an option to index every url with protocol for new webpages.

Powered by GitHub Issue Mirror