How to change the generated default tracking code?


#1

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.

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.e.
I need:
var u="//analytics.abc.com/";
to always be:
var u=“https://analytics.abc.com/


(Matthieu Aubry) #2

Hi there,

You can replace: var u="//analytics.abc.com/";
by var u=“https://analytics.abc.com/