matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.73k stars 2.63k forks source link

Tracking code could check whether HTTP is working, if not use HTTPs by default #7267

Open Tobias-Conrad opened 9 years ago

Tobias-Conrad commented 9 years ago

url not defined!! i was disabling all plugins and deleted the piwik user and the site in piwik. still getting no urls.

may have a look at www.holzkunst-conrad.de

if you could not help please provide a link where to get help. piwik forum gives no answer to my question. the question was asked about 10 times without a solution.

tsteur commented 9 years ago

Sorry, I don't understand what you mean with "getting no urls"?

Tobias-Conrad commented 9 years ago

i run 7 pages only on this one the problem occurs: www.holzkunst-conrad.de

urls not defined: http://awesomescreenshot.com/0794gn6u9c

software settings of piwik installation http://awesomescreenshot.com/03e4gn6t75

settings of wp installation http://awesomescreenshot.com/0094gn7if0

thanks for helping ;-)

sgiehl commented 9 years ago

Your tracking pixel is redirect from http to https. While redirecting, the parameters seem to get encoded. Maybe thats causing problems. Try to replace the url within the tracking pixel to use https only: var u="https://www.santegra-international.com/piwik/";

Tobias-Conrad commented 9 years ago

@sgiehl you did it working well. So how can piwik be improved to avoid this?

sgiehl commented 9 years ago

Not sure if we can manage that safely within piwik as it is depending on the tracked site and it's server. Maybe we could improve the tracking code generator to give an option to choose https only?

Tobias-Conrad commented 9 years ago

i looked at my other sites they have the same problem. Normaly when one site that needs to be tracked is with SSL also the tracking host domain has to be with SSL. So https only is mostly used i think.

Tobias-Conrad commented 9 years ago

to bad also the https://wordpress.org/plugins/wp-piwik/ plugin throwing out var u="//www. and not possible to change it. i will link to this discussion. https://wordpress.org/support/topic/ssl-piwik-host-and-non-ssl-tracked-sites-error-not-found-url

mattab commented 9 years ago

fyi this is documented in the faq

mattab commented 9 years ago

I dont think we can fix anything here, but maybe we could make the UI more clear to explain to user to investigate their redirect script?

Btw @Tobias-Conrad do you know how your redirects http -> https are implemented?

Tobias-Conrad commented 9 years ago

@mattab May i did not get your question. My Piwik is hosted on an server with https. Most sites I track have no https. So May Piwik tracking should choose to track via https when not getting the url! It is so easy... Host is https tracking is https for all sites. This I promise you will be a heavy impact in user statisfaction. You just lose them when they have problems.

tsteur commented 9 years ago

:+1: maybe we can find a solution for this when we know that the current Piwik user is using https. We could do a request to http and check the response code etc. for a more accurate tracking code generator

mattab commented 9 years ago

I renamed issue in attempt to clarify the scope