My Piwik server runs as a secure server (https://analytics.abc.com.) I manage statistics for 100+ sites, many of which are not secure sites (http://xxx.com.) When a site admin gets the code from Piwik for a non-secure site, it takes the site type info from the user’s site. This causes analytics info to be sent to http://analytics.abc.com from the non-secure sites, and to https://analytics.abc.com for secure sites.
Even if the non-secure requests are successfully redirected to the secure server, the original page information is lost during the redirect. My admins then get analytics with hits, but no information about which pages were hit.