How to change the generated default tracking code?

My Piwik server runs as a secure server ( I manage statistics for 100+ sites, many of which are not secure sites ( 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 from the non-secure sites, and to 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.

How can I change the Piwik generated default javascript tracking code to generate the complete url of my secure server for both secure and non-secure sites?

I need:
var u="//";
to always be:
var u=“

Hi there,

You can replace: var u="//";
by var u=“